mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Refactor avatar movement code
plMovementStrategy classes have been reworked and completely replace all plAvatarControllers. While based on the old implementation, plPhysicalControllerCore has essentially been rewritten. Remnants of long gone physical "actions" have been removed. 4 files removed - plAVCallbackAction.h & plAVCallbackAction.cpp plAntiGravAction.h & plAntiGravAction.cpp This revision will not compile, requires new plPXPhysicalControllerCore implementation.
This commit is contained in:
@ -39,7 +39,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#include "plAvatar/plAvCallbackAction.h"
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "plCollisionDetector.h"
|
||||
@ -65,6 +64,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plAvatar/plAvatarMgr.h"
|
||||
#include "plAvatar/plAvBrainHuman.h"
|
||||
#include "plAvatar/plAvBrainDrive.h"
|
||||
#include "plAvatar/plPhysicalControllerCore.h"
|
||||
|
||||
#include "plModifier/plDetectorLog.h"
|
||||
|
||||
@ -475,7 +475,7 @@ void plObjectInVolumeAndFacingDetector::ICheckForTrigger()
|
||||
// And are we walking towards it?
|
||||
plArmatureBrain* abrain = armMod->FindBrainByClass(plAvBrainHuman::Index()); //armMod->GetCurrentBrain();
|
||||
plAvBrainHuman* brain = plAvBrainHuman::ConvertNoRef(abrain);
|
||||
if (brain && brain->IsMovingForward() && brain->fCallbackAction->IsOnGround())
|
||||
if (brain && brain->IsMovingForward() && brain->fWalkingStrategy->IsOnGround())
|
||||
movingForward = true;
|
||||
}
|
||||
else
|
||||
@ -645,11 +645,11 @@ bool plPanicLinkRegion::MsgReceive(plMessage* msg)
|
||||
{
|
||||
if (avMod->IsLinkedIn())
|
||||
{
|
||||
hsPoint3 kinPos;
|
||||
hsPoint3 pos;
|
||||
if (avMod->GetController())
|
||||
{
|
||||
avMod->GetController()->GetKinematicPosition(kinPos);
|
||||
DetectorLogSpecial("Avatar is panic linking. KinPos at %f,%f,%f and is %s",kinPos.fX,kinPos.fY,kinPos.fZ,avMod->GetController()->IsEnabled() ? "enabled" : "disabled");
|
||||
avMod->GetController()->GetPositionSim(pos);
|
||||
DetectorLogSpecial("Avatar is panic linking. Position %f,%f,%f and is %s", pos.fX, pos.fY, pos.fZ, avMod->GetController()->IsEnabled() ? "enabled" : "disabled");
|
||||
}
|
||||
avMod->PanicLink(fPlayLinkOutAnim);
|
||||
} else
|
||||
|
@ -72,25 +72,6 @@ namespace plSimDefs
|
||||
kGroupMax,
|
||||
};
|
||||
|
||||
/** A taxonomy of action types. Crucial for doing things like making sure you don't
|
||||
do things like attach duplicate actions. */
|
||||
enum ActionType
|
||||
{
|
||||
kUnknownAction = 0x01, // don't know the type (probably forgot to override GetType())
|
||||
kUnknownZAction = 0x02, // unknown type of z-order action
|
||||
kAntiGravityAction = 0x03, // an action that counters gravity exactly
|
||||
kUprightAction = 0x04, // an action that keeps an object upright by apply force
|
||||
kPhysAnimAction = 0x05, // an action that parses keyframed animation into physical information
|
||||
kConstraint = 0x06, // a general constraint.
|
||||
kCallbackAction = 0x07, // an action that just hands us the physics "tick"
|
||||
kPseudoPhysAction = 0x08, // replacement for the physAnim
|
||||
kAntiGravAction = 0x09, // makes things float in the air
|
||||
kBasicGroundAction = 0x0a, // for your basic walkAroundOnGround corrections
|
||||
kHorizontalFreeze = 0x0b, // Let's you fall vertically, but otherwise keeps you in place (generic brains)
|
||||
|
||||
kMaxAction = 0xffff // force 16-bit
|
||||
};
|
||||
|
||||
/** Different types of line-of-sight requests. */
|
||||
enum LOSReqType
|
||||
{
|
||||
|
Reference in New Issue
Block a user