- all those 'actor->SetZ(actor->Z() +...) calls weren't pretty so now there's an AddZ method, too.

This commit is contained in:
Christoph Oelckers 2016-01-18 22:32:36 +01:00
commit ef7be016c4
9 changed files with 13 additions and 13 deletions

View file

@ -134,13 +134,13 @@ DEFINE_ACTION_FUNCTION(AActor, A_FiredChase)
if (self->threshold) self->threshold--;
// Float up and down
self->SetZ(self->Z() + finesine[weaveindex << BOBTOFINESHIFT] * 8);
self->AddZ(finesine[weaveindex << BOBTOFINESHIFT] * 8);
self->special1 = (weaveindex + 2) & 63;
// Ensure it stays above certain height
if (self->Z() < self->floorz + (64*FRACUNIT))
{
self->SetZ(self->Z() + 2*FRACUNIT);
self->AddZ(2*FRACUNIT);
}
if(!self->target || !(self->target->flags&MF_SHOOTABLE))