44 int groupSize = (int)par(
"groupSize");
85 <<
" SIMPLECLIENT: Movement generator: greatGathering"
94 <<
" SIMPLECLIENT: Movement generator: groupRoaming"
99 else if(strcmp(
GeneratorType.c_str(),
"hotspotRoaming") == 0) {
103 <<
" SIMPLECLIENT: Movement generator: hotspotRoaming"
109 else if(strcmp(
GeneratorType.c_str(),
"traverseRoaming") == 0) {
113 <<
" SIMPLECLIENT: Movement generator: traverseRoaming"
119 else if(strcmp(
GeneratorType.c_str(),
"realWorldRoaming") == 0) {
123 <<
" SIMPLECLIENT: Movement generator: realWorldRoaming"
131 appFd = INVALID_SOCKET;
139 <<
" SIMPLECLIENT: Movement generator: randomRoaming"
145 <<
" SIMPLECLIENT: Movement generator: <unknown>. Defaulting to: randomRoaming"
159 if(msg->isName(
"move_timer")) {
168 else if(msg->isName(
"packetNotification")) {
173 switch (packet.
func) {
176 error(
"SimpleClient::handleMessage(): Received packet from unknown socket!");
181 if(
appFd != INVALID_SOCKET) {
182 error(
"SimpleClient::handleMessage(): Multiple connections not supported yet!");
184 if (packet.
addr != NULL) {
192 error(
"SimpleClient::handleMessage(): Trying to close unknown connection!");
194 appFd = INVALID_SOCKET;
203 else if(msg->isName(
"Snowball landing")) {
208 cMessage* unfreeze =
new cMessage(
"unfreeze me");
209 scheduleAt(simTime() + 5, unfreeze);
226 int packetlen =
sizeof(scfreeze);
233 else if(msg->isName(
"unfreeze me")) {
241 if(dynamic_cast<GameAPIMessage*>(msg)) {
295 const char* msg = chatMsg->
getMsg();
300 strcpy(pack->
msg, msg);
328 simtime_t snow_t = snowTime.tv_sec + snowTime.tv_usec / 1000000.0;
329 scheduleAt(simTime() + snow_t, snowTimer);
336 scfreeze.ip = frozenMsg->
getSrc().
getIp().get4().getInt();
340 int packetlen =
sizeof(scfreeze);
380 int packetSize =
sizeof(packet);
388 temp.
x = packet->
posX;
389 temp.
y = packet->
posY;
422 packetSize =
sizeof(removePacket);
432 packetSize =
sizeof(addPacket);