Steve_Yorkshire Posted April 5, 2018 Posted April 5, 2018 Whilst browsing through the current dev branch I noticed my old AiPoses resource which I had asked someone to pull. I also noticed that originally I'd use ShapeBase to store the mAiPose var, and thought that it could probably be streamlined to be removed from ShapeBase.cpp/h and incorporated into Player.cpp/h.ShapeBase.h//... //S32 mAiPose; ///< Current pose.//REMOVED LINE 892 F32 mEnergy; ///< Current enery level. F32 mRechargeRate; ///< Energy recharge rate (in units/tick). //... ShapeBase.cpp//... ShapeBase::ShapeBase() : mDataBlock( NULL ), mIsAiControlled( false ), mControllingObject( NULL ), //mAiPose( 0 ),//REMOVED LINE 989 mMoveMotion( false ), //... And move them over to Player.Player.h//... void allowProne(bool state) { mAllowProne = state; } void allowSwimming(bool state) { mAllowSwimming = state; } S32 mAiPose; //ADDED ~LINE 733 bool canJump(); ///< Can the player jump? bool canJetJump(); ///< Can the player jet? //... Player.cpp//... dMemset( mSplashEmitter, 0, sizeof( mSplashEmitter ) ); mUseHeadZCalc = true; mAiPose = 0; //ADDED ~LINE 1623 allowAllPoses(); mImpactSound = 0; //... And all seems to work as before using Player/AiPlayer.cpp/h but no longer using ShapeBase.cpp/h.There is no real extra benefit - beyond freeing up an already crowded shapeBase - to doing things this way ... except autism and OCD, but hey :roll: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.