Overview
Comment: | Migrate projectile to a class |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d3b4b2d476d809f7ab00502eed47614c |
User & Date: | js on 2025-03-09 11:24:01 |
Other Links: | manifest | tags |
Context
2025-03-09
| ||
18:57 | Convert dynent to a class check-in: d2b3ff790f user: js tags: trunk | |
11:24 | Migrate projectile to a class check-in: d3b4b2d476 user: js tags: trunk | |
10:25 | Use SDL_TextInputEvent for input check-in: 4c092023dc user: js tags: trunk | |
Changes
Added src/Projectile.h version [28cf35ad48].
Added src/Projectile.m version [902fed7b64].
Modified src/meson.build from [b573376159] to [2625064d57].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | + | executable('client', [ 'Alias.m', 'Command.mm', 'Cube.mm', 'Identifier.m', 'KeyMapping.m', 'MD2.mm', 'MapModelInfo.m', 'Menu.m', 'MenuItem.m', 'Projectile.m', 'Variable.mm', 'client.mm', 'clientextras.mm', 'clientgame.mm', 'clients2c.mm', 'commands.mm', 'console.mm', |
︙ |
Modified src/protos.h from [8800716a44] to [455fc77430].
︙ | |||
121 122 123 124 125 126 127 | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | - - + + | extern void resettagareas(); extern void settagareas(); extern entity *newentity( int x, int y, int z, OFString *what, int v1, int v2, int v3, int v4); // worldlight extern void calclight(); |
︙ | |||
162 163 164 165 166 167 168 | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | - + - + | extern void pruneundos(int maxremain = 0); // renderextras extern void line(int x1, int y1, float z1, int x2, int y2, float z2); extern void box(block &b, float z1, float z2, float z3, float z4); extern void dot(int x, int y, float z); extern void linestyle(float width, int r, int g, int b); |
︙ | |||
198 199 200 201 202 203 204 | 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | - + | extern void moveplayer(dynent *pl, int moveres, bool local); extern bool collide(dynent *d, bool spawn, float drop, float rise); extern void entinmap(dynent *d); extern void setentphysics(int mml, int mmr); extern void physicsframe(); // sound |
︙ |
Modified src/renderextras.mm from [3268694917] to [4ee74611a3].
︙ | |||
85 86 87 88 89 90 91 | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | - + | int type; sphere *next; }; sphere spheres[MAXSPHERES], *slist = NULL, *sempty = NULL; bool sinit = false; void |
︙ |
Modified src/renderparticles.mm from [b42cd85412] to [f46610835d].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - - + + | particle *next; }; particle particles[MAXPARTICLES], *parlist = NULL, *parempty = NULL; bool parinit = false; VARP(maxparticles, 100, 2000, MAXPARTICLES - 500); |
︙ | |||
129 130 131 132 133 134 135 | 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 | - + - + - | glEnable(GL_FOG); glDisable(GL_BLEND); glDepthMask(GL_TRUE); } void |
︙ |
Modified src/sound.mm from [7dfddc04de] to [4f8b2c4c47].
︙ | |||
88 89 90 91 92 93 94 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - - + + + - - + + + | @autoreleasepool { OFString *path = [OFString stringWithFormat:@"packages/%@", name]; OFIRI *IRI = [Cube.sharedInstance.gameDataIRI IRIByAppendingPathComponent:path]; #ifdef USE_MIXER |
︙ | |||
162 163 164 165 166 167 168 | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | - - + + | #else FSOUND_Close(); #endif } VAR(stereo, 0, 1, 1); |
︙ | |||
190 191 192 193 194 195 196 | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | - - + + | Mix_SetPanning(chan, 255 - pan, pan); #else FSOUND_SetVolume(chan, vol); FSOUND_SetPan(chan, pan); #endif } |
︙ | |||
226 227 228 229 230 231 232 | 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | - + | addmsg(0, 2, SV_SOUND, n); playsound(n); } int soundsatonce = 0, lastsoundmillis = 0; void |
︙ |
Modified src/weapon.mm from [a095df6286] to [652afaa3f5].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + - - - - + + + + | // weapon.cpp: all shooting and effects code #include "cube.h" |
︙ | |||
79 80 81 82 83 84 85 86 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | + - + - - + + | #define RNDD (rnd(101) - 50) * f OFVector3D r = OFMakeVector3D(RNDD, RNDD, RNDD); sg[i] = to; vadd(sg[i], r); } } // if lineseg hits entity bounding box bool |
︙ | |||
124 125 126 127 128 129 130 | 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 162 163 164 165 | - + - - - - - - - + + - + - - + + + - - + + - - - - - - - + + + + + + + | if (intersect(o, player1->o, worldpos)) return @(o->name); } return nil; } |
︙ | |||
177 178 179 180 181 182 183 | 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 199 200 201 202 203 204 205 206 207 208 209 210 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 283 284 285 286 287 288 289 290 291 292 293 294 | - - + + - - + + - - + + - - + + - + - + - + - + - - - + + + - - + + + - - + + - - + + - - + + - + - + - + - + - + - - + + - + - + | particle_splash(3, damage, 1000, d->o); demodamage(damage, d->o); } const float RL_RADIUS = 5; const float RL_DAMRAD = 7; // hack |
︙ |
Modified src/worldlight.mm from [6a518301f9] to [ccc85287d7].
︙ | |||
196 197 198 199 200 201 202 | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | - - + + | block *backup = dlights.pop(); blockpaste(*backup); free(backup); } } void |
︙ |