Convert player into a class

FossilOrigin-Name: 5b7b7d2fc5af4d512db195c4fbfb2aff01436db9bc1345d62263609ac129aa02
This commit is contained in:
Jonathan Schleifer 2025-03-24 22:14:24 +00:00
parent 4596a656dc
commit 5835957d74
25 changed files with 211 additions and 166 deletions

View file

@ -10,6 +10,7 @@
#import "Entity.h"
#import "MapModelInfo.h"
#import "Monster.h"
#import "Player.h"
// collide with player or monster
static bool
@ -179,8 +180,8 @@ collide(DynamicEntity *d, bool spawn, float drop, float rise)
return false;
}
if (d != player1)
if (!plcollide(d, player1, &headspace, &hi, &lo))
if (d != Player.player1)
if (!plcollide(d, Player.player1, &headspace, &hi, &lo))
return false;
// this loop can be a performance bottleneck with many monster on a slow