Differences From Artifact [1561f54e4a]:
- File
src/clients2c.mm
— part of check-in
[489124a92f]
at
2025-03-16 10:11:39
on branch trunk
— Use one autorelease pool per frame
This way, nowhere else autorelease pools need to be managed. (user: js, size: 8787) [annotate] [blame] [check-ins using]
To Artifact [84894b97fe]:
- File src/clients2c.mm — part of check-in [4b002822f9] at 2025-03-20 16:04:35 on branch trunk — Convert entity to a class (user: js, size: 8857) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 7 8 9 10 11 12 | // client processing of the incoming network stream #include "cube.h" #import "DynamicEntity.h" extern int clientnum; extern bool c2sinit, senditemstoserver; extern OFString *toservermap; extern OFString *clientpassword; void | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 | // client processing of the incoming network stream #include "cube.h" #import "DynamicEntity.h" #import "Entity.h" extern int clientnum; extern bool c2sinit, senditemstoserver; extern OFString *toservermap; extern OFString *clientpassword; void |
︙ | ︙ | |||
276 277 278 279 280 281 282 | setspawn(getint(p), false); getint(p); break; case SV_ITEMSPAWN: { uint i = getint(p); setspawn(i, true); | | | 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | setspawn(getint(p), false); getint(p); break; case SV_ITEMSPAWN: { uint i = getint(p); setspawn(i, true); if (i >= (uint)ents.count) break; OFVector3D v = OFMakeVector3D(ents[i].x, ents[i].y, ents[i].z); playsound(S_ITEMSPAWN, &v); break; } |
︙ | ︙ | |||
324 325 326 327 328 329 330 | } break; } case SV_EDITENT: // coop edit of ent { uint i = getint(p); | > | > | > > > | 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | } break; } case SV_EDITENT: // coop edit of ent { uint i = getint(p); while ((uint)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); ents[i].attr1 = getint(p); ents[i].attr2 = getint(p); |
︙ | ︙ |