From c28c0b8f0b54c05dff75abe440f94a4ee0be4657 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 8 Nov 2014 08:53:32 +0100 Subject: [PATCH] Revert "Backport 'A_FaceConsolePlayer' from zandronum." This reverts commit eab971500b43b6bac77af29aec1c299d68f2710e. As Edward850 pointed out, this feature is broken by design and therefore completely useless. --- src/thingdef/thingdef_codeptr.cpp | 30 ------------------------------ wadsrc/static/actors/actor.txt | 1 - 2 files changed, 31 deletions(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 28affbb0f..2732337c7 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -3781,36 +3781,6 @@ DEFINE_ACTION_FUNCTION(AActor, A_RaiseSiblings) } } -//=========================================================================== -// -// [TP] A_FaceConsolePlayer -// -//=========================================================================== -DEFINE_ACTION_FUNCTION_PARAMS (AActor, A_FaceConsolePlayer) { - ACTION_PARAM_START (1); - ACTION_PARAM_ANGLE (MaxTurnAngle, 0); - - angle_t Angle; - angle_t DeltaAngle; - AActor *pConsolePlayer; - - // Always watch the consoleplayer. - pConsolePlayer = players[consoleplayer].mo; - if (( playeringame[consoleplayer] == false ) || ( pConsolePlayer == NULL )) - return; - - // Find the angle between the actor and the console player. - Angle = R_PointToAngle2( self->x, self->y, pConsolePlayer->x, pConsolePlayer->y ); - DeltaAngle = Angle - self->angle; - - if (( MaxTurnAngle == 0 ) || ( DeltaAngle < MaxTurnAngle ) || ( DeltaAngle > (unsigned)-MaxTurnAngle )) - self->angle = Angle; - else if ( DeltaAngle < ANG180 ) - self->angle += MaxTurnAngle; - else - self->angle -= MaxTurnAngle; -} - //=========================================================================== // // A_MonsterRefire diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 468b0f7b5..e253f53ac 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -186,7 +186,6 @@ ACTOR Actor native //: Thinker action native A_ClearSoundTarget(); action native A_FireAssaultGun(); action native A_CheckTerrain(); - action native A_FaceConsolePlayer(float MaxTurnAngle = 0); // [TP] action native A_MissileAttack(); action native A_MeleeAttack();