Differences From Artifact [476557dd41]:
- File src/clients2c.m — part of check-in [7a98b92af9] at 2025-03-25 23:52:50 on branch trunk — Make use of OF_DIRECT (user: js, size: 9451) [annotate] [blame] [check-ins using]
To Artifact [11f87c82e6]:
- File
src/clients2c.m
— part of check-in
[75e920ae30]
at
2025-03-29 14:25:43
on branch trunk
— Switch from clang-format to manual formatting
clang-format does too many weird things. (user: js, size: 9452) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
170 171 172 173 174 175 176 | if (mapchanged) setspawn(n, true); break; } // server requests next map case SV_MAPRELOAD: { getint(&p); | | | > | < | | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | if (mapchanged) setspawn(n, true); break; } // server requests next map case SV_MAPRELOAD: { getint(&p); OFString *nextmapalias = [OFString stringWithFormat: @"nextmap_%@", getclientmap()]; // look up map in the cycle OFString *map = getalias(nextmapalias); changemap(map != nil ? map : getclientmap()); break; } // another client either connected or changed name/team case SV_INITC2S: { Player *d_ = (Player *)d; sgetstr(); if (d_.name.length > 0) { // already connected if (![d_.name isEqual: @(text)]) conoutf(@"%@ is now known as %s", d_.name, text); } else { // new client // send new players my info again c2sinit = false; |
︙ | ︙ | |||
275 276 277 278 279 280 281 | OFVector3D loc = d_.origin; playsound(S_DIE1 + rnd(2), &loc); d_.lifeSequence++; break; } case SV_FRAGS: | | | 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | OFVector3D loc = d_.origin; playsound(S_DIE1 + rnd(2), &loc); d_.lifeSequence++; break; } case SV_FRAGS: OFAssert([players[cn] isKindOfClass: Player.class]); ((Player *)players[cn]).frags = getint(&p); break; case SV_ITEMPICKUP: setspawn(getint(&p), false); getint(&p); break; |
︙ | ︙ | |||
338 339 340 341 342 343 344 | case SV_EDITENT: // coop edit of ent { unsigned int i = getint(&p); while (ents.count <= i) { Entity *e = [Entity entity]; e.type = NOTUSED; | | | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | case SV_EDITENT: // coop edit of ent { unsigned int i = getint(&p); while (ents.count <= i) { Entity *e = [Entity entity]; e.type = NOTUSED; [ents addObject: e]; } int to = ents[i].type; ents[i].type = getint(&p); ents[i].x = getint(&p); ents[i].y = getint(&p); ents[i].z = getint(&p); |
︙ | ︙ | |||
368 369 370 371 372 373 374 | addmsg(0, 2, SV_CLIENTPING, Player.player1.ping = (Player.player1.ping * 5 + lastmillis - getint(&p)) / 6); break; case SV_CLIENTPING: | | | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | addmsg(0, 2, SV_CLIENTPING, Player.player1.ping = (Player.player1.ping * 5 + lastmillis - getint(&p)) / 6); break; case SV_CLIENTPING: OFAssert([players[cn] isKindOfClass: Player.class]); ((Player *)players[cn]).ping = getint(&p); break; case SV_GAMEMODE: nextmode = getint(&p); break; |
︙ | ︙ |