Comment: | Migrate more strings |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
fa4b03aacafc3bab0a52c144241ab665 |
User & Date: | js on 2025-03-08 00:48:42 |
Other Links: | manifest | tags |
2025-03-08
| ||
00:58 | More string migration check-in: 245efe8045 user: js tags: trunk | |
00:48 | Migrate more strings check-in: fa4b03aaca user: js tags: trunk | |
2025-03-07
| ||
23:33 | Fix newent accepting hex check-in: 291f7a7146 user: js tags: trunk | |
Modified src/Cube.mm from [b09eeb8e8f] to [aeae4b6df1].
︙ | |||
86 87 88 89 90 91 92 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - + - | log(@"net"); if (enet_initialize() < 0) fatal(@"Unable to initialise network module"); initclient(); // never returns if dedicated |
︙ |
Modified src/client.mm from [e93d114d64] to [2cc0559143].
︙ | |||
289 290 291 292 293 294 295 | 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | - + | uchar *p = start + 2; bool serveriteminitdone = false; if (toservermap.length > 0) // suggest server to change map { // do this exclusively as map change may invalidate rest of // update packet->flags = ENET_PACKET_FLAG_RELIABLE; putint(p, SV_MAPCHANGE); |
︙ | |||
330 331 332 333 334 335 336 | 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | - + - - + + | serveriteminitdone = true; } if (ctext[0]) // player chat, not flood protected for // now { packet->flags = ENET_PACKET_FLAG_RELIABLE; putint(p, SV_TEXT); |
︙ |
Modified src/clientextras.mm from [55a0200404] to [45d297fe4b].
︙ | |||
187 188 189 190 191 192 193 | 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | - + | if (mapdata == nil) return; ENetPacket *packet = enet_packet_create( NULL, MAXTRANS + mapdata.count, ENET_PACKET_FLAG_RELIABLE); uchar *start = packet->data; uchar *p = start + 2; putint(p, SV_SENDMAP); |
︙ |
Modified src/clientgame.mm from [e005695b56] to [ce2ec26dd6].
︙ | |||
506 507 508 509 510 511 512 | 506 507 508 509 510 511 512 513 514 515 516 | - + | toggleedit(); setvar(@"gamespeed", 100); setvar(@"fog", 180); setvar(@"fogcolour", 0x8099B3); showscores(false); intermission = false; Cube.sharedInstance.framesInMap = 0; |
Modified src/clients2c.mm from [e48be73a93] to [a718bd08e4].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + - - + - | neterr(OFString *s) { conoutf(@"illegal network message (%@)", s); disconnect(); } void |
︙ | |||
96 97 98 99 100 101 102 | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | - + | @"to join this server!"); disconnect(); return; } if (getint(p) == 1) conoutf(@"server is FULL, disconnecting.."); break; |
︙ | |||
125 126 127 128 129 130 131 | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | - + + - + + - + | int state = f >> 3; if (state == CS_DEAD && d->state != CS_DEAD) d->lastaction = lastmillis; d->state = state; if (!demoplayback) updatepos(d); break; |
︙ | |||
363 364 365 366 367 368 369 | 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | + - + - - - + + + | case SV_RECVMAP: { sgetstr(); conoutf(@"received map \"%s\" from server, reloading..", text); int mapsize = getint(p); @autoreleasepool { OFString *string = @(text); |
︙ |
Modified src/commands.mm from [5c63a6ff95] to [ac6583caf8].
︙ | |||
341 342 343 344 345 346 347 | 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | - - + - - - - | } } bool execfile(OFString *cfgfile) { @autoreleasepool { |
︙ |
Modified src/menus.mm from [27b088d99d] to [8be4b9144c].
︙ | |||
152 153 154 155 156 157 158 | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | - + | menusel = 0; menus[vmenu].menusel = menusel; } else { if (code == SDLK_RETURN || code == -2) { OFString *action = menus[vmenu].items[menusel].action; if (vmenu == 1) { @autoreleasepool { |
︙ |
Modified src/protos.h from [cecc5f4a0e] to [dbbc22637c].
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + | extern void menumanual(int m, int n, OFString *text); extern void sortmenu(); extern bool menukey(int code, bool isdown); extern void newmenu(OFString *name); // serverbrowser extern void addserver(OFString *servername); |
︙ | |||
78 79 80 81 82 83 84 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | - + - + | extern void sendpackettoserv(void *packet); extern void gets2c(); extern void c2sinfo(dynent *d); extern void neterr(OFString *s); extern void initclientnet(); extern bool netmapstart(); extern int getclientnum(); |
︙ | |||
211 212 213 214 215 216 217 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | - - + + - + - - - - + + + + - + | extern void rendermodel(OFString *mdl, int frame, int range, int tex, float rad, float x, float y, float z, float yaw, float pitch, bool teammate, float scale, float speed, int snap = 0, int basetime = 0); @class MapModelInfo; extern MapModelInfo *getmminfo(int i); // server |
︙ |
Modified src/renderextras.mm from [a953917ec3] to [2f71e0ae26].
︙ | |||
363 364 365 366 367 368 369 | 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | - + - - + + | dblend = 0; } glEnable(GL_TEXTURE_2D); @autoreleasepool { OFString *command = getcurcommand(); |
︙ |
Modified src/server.mm from [9821265b10] to [133bbad38c].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + | string name; int modevote; }; vector<client> clients; int maxclients = 8; |
︙ | |||
92 93 94 95 96 97 98 | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | - + - + | else send(cn, packet); if (packet->referenceCount == 0) enet_packet_destroy(packet); }; void |
︙ | |||
161 162 163 164 165 166 167 | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | + + + - - - + + + + - + | else no++; } else no++; }; if (yes == 1 && no == 0) return true; // single player @autoreleasepool { OFString *msg = [OFString stringWithFormat: |
︙ | |||
207 208 209 210 211 212 213 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | - + + - + + - + - + - + - + + - + + | break; case SV_MAPCHANGE: { sgetstr(); int reqmode = getint(p); if (reqmode < 0) reqmode = 0; |
︙ | |||
303 304 305 306 307 308 309 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 | + - - + + + - + - + - + | ENetPacket *packet = enet_packet_create(NULL, MAXTRANS, ENET_PACKET_FLAG_RELIABLE); uchar *start = packet->data; uchar *p = start + 2; putint(p, SV_INITS2C); putint(p, n); putint(p, PROTOCOL_VERSION); @autoreleasepool { |
︙ | |||
367 368 369 370 371 372 373 | 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | - + - + | }; void resetserverifempty() { loopv(clients) if (clients[i].type != ST_EMPTY) return; clients.setsize(0); |
︙ | |||
505 506 507 508 509 510 511 | 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | - - + + - + + + - - + + + | client &c = addclient(); c.type = ST_LOCAL; strcpy_s(c.hostname, "local"); send_welcome(&c - &clients[0]); }; void |
︙ |
Modified src/serverbrowser.mm from [23e77d6100] to [c6e27aadf2].
︙ | |||
141 142 143 144 145 146 147 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | - + + - + + | ENetAddress address; }; vector<serverinfo> servers; ENetSocket pingsock = ENET_SOCKET_NULL; int lastinfo = 0; |
︙ | |||
268 269 270 271 272 273 274 | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | - - - - - + + + + + + + + + + | loopv(servers) { serverinfo &si = servers[i]; if (si.address.host != ENET_HOST_ANY && si.ping != 9999) { if (si.protocol != PROTOCOL_VERSION) sprintf_s(si.full)( "%s [different cube protocol]", si.name); |
︙ |
Modified src/serverms.mm from [67a9f7fd73] to [063897f679].
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + - + - + - + | httpgetsend(ENetAddress &ad, char *hostname, char *req, char *ref, char *agent) { if (ad.host == ENET_HOST_ANY) { printf("looking up %s...\n", hostname); enet_address_set_host(&ad, hostname); if (ad.host == ENET_HOST_ANY) return; |
︙ | |||
106 107 108 109 110 111 112 | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | - + - - + + | eb.dataLength = buflen - 1; while (mssock != ENET_SOCKET_NULL) httpgetrecieve(eb); return stripheader(buf); }; ENetSocket pongsock = ENET_SOCKET_NULL; |
︙ | |||
132 133 134 135 136 137 138 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | - - - + + + - + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + + + | if (len < 0) return; p = &pong[len]; putint(p, PROTOCOL_VERSION); putint(p, mode); putint(p, numplayers); putint(p, minremain); |
Modified src/serverutil.mm from [b2c8903da8] to [e5f6cbf888].
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | - - + + - + + + - - - + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + - + - + | } else if (c == -127) { int n = *p++; n |= *p++ << 8; n |= *p++ << 16; return n | (*p++ << 24); } else return c; |
︙ | |||
90 91 92 93 94 95 96 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - + - + - + | if (*p == msg) return p[1]; return -1; }; // sending of maps between clients |
︙ | |||
185 186 187 188 189 190 191 | 188 189 190 191 192 193 194 195 196 197 198 | - + | default: printf("WARNING: unknown commandline option\n"); }; }; if (enet_initialize() < 0) fatal(@"Unable to initialise network module"); |
Modified src/tools.h from [257c91a25c] to [217eb7d86e].
︙ | |||
44 45 46 47 48 49 50 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - + - - - - - | } #define loop(v, m) for (int v = 0; v < (m); v++) #define loopi(m) loop(i, m) #define loopj(m) loop(j, m) #define loopk(m) loop(k, m) #define loopl(m) loop(l, m) |
︙ |
Modified src/weapon.mm from [efed2ffe54] to [f70bf0b290].
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - + - - + + + + + | } return (p->x <= d->o.x + d->radius && p->x >= d->o.x - d->radius && p->y <= d->o.y + d->radius && p->y >= d->o.y - d->radius && p->z <= d->o.z + d->aboveeye && p->z >= d->o.z - d->eyeheight); } |
︙ |