279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
case M_AIMING:
// this state is the delay between wanting to shoot and actually
// firing
if (m.trigger < lastmillis) {
m.lastaction = 0;
m.attacking = true;
shoot(m, m.attacktarget);
transition(m, M_ATTACKING, 0, 600, 0);
}
break;
case M_HOME:
// monster has visual contact, heads straight for player and
// may want to shoot at any time
|
>
|
|
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
|
case M_AIMING:
// this state is the delay between wanting to shoot and actually
// firing
if (m.trigger < lastmillis) {
m.lastaction = 0;
m.attacking = true;
OFVector3D attacktarget = m.attacktarget;
shoot(m, &attacktarget);
transition(m, M_ATTACKING, 0, 600, 0);
}
break;
case M_HOME:
// monster has visual contact, heads straight for player and
// may want to shoot at any time
|