Convert monster into a class
FossilOrigin-Name: e8f80b0482846dfbd5bf97ed375b13687d325e9ef7e2a79176dac49722180124
This commit is contained in:
parent
a7db00c740
commit
2c5f2d0342
16 changed files with 319 additions and 224 deletions
|
@ -3,6 +3,7 @@
|
|||
#include "cube.h"
|
||||
|
||||
#import "DynamicEntity.h"
|
||||
#import "Monster.h"
|
||||
|
||||
// render players & monsters
|
||||
// very messy ad-hoc handling of animation frames, should be made more
|
||||
|
@ -53,9 +54,11 @@ renderclient(
|
|||
n = 16;
|
||||
} else if (d.state == CS_LAGGED) {
|
||||
n = 17;
|
||||
} else if (d.monsterState == M_ATTACKING) {
|
||||
} else if ([d isKindOfClass:Monster.class] &&
|
||||
((Monster *)d).monsterState == M_ATTACKING) {
|
||||
n = 8;
|
||||
} else if (d.monsterState == M_PAIN) {
|
||||
} else if ([d isKindOfClass:Monster.class] &&
|
||||
((Monster *)d).monsterState == M_PAIN) {
|
||||
n = 10;
|
||||
} else if ((!d.move && !d.strafe) || !d.moving) {
|
||||
n = 12;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue