Convert monster into a class

FossilOrigin-Name: e8f80b0482846dfbd5bf97ed375b13687d325e9ef7e2a79176dac49722180124
This commit is contained in:
Jonathan Schleifer 2025-03-23 02:03:32 +00:00
parent a7db00c740
commit 2c5f2d0342
16 changed files with 319 additions and 224 deletions

View file

@ -4,6 +4,7 @@
#import "DynamicEntity.h"
#import "Entity.h"
#import "Monster.h"
#import "OFString+Cube.h"
int nextmode = 0; // nextmode becomes gamemode after next map load
@ -174,7 +175,7 @@ updateworld(int millis) // main game update loop
}
otherplayers();
if (!demoplayback) {
monsterthink();
[Monster thinkAll];
if (player1.state == CS_DEAD) {
if (lastmillis - player1.lastAction < 2000) {
player1.move = player1.strafe = 0;
@ -417,7 +418,7 @@ startmap(OFString *name) // called just after a map load
conoutf(@"coop sp not supported yet");
}
sleepwait = 0;
monsterclear();
[Monster resetAll];
projreset();
spawncycle = -1;
spawnplayer(player1);