Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Search: AI_Player.CPP
- bool obj_Player::IsPushActive()
- {
- return pushVelocity > 0;
- }
- #endif
- #Add below:
- void obj_Player::StartLitter()
- {
- uberAnim_->StartLitterAnim();
- PKT_C2C_StartLitter_s n;
- p2pSendToHost(this, &n, sizeof(n));
- }
- void obj_Player::StartWeaponShow()
- {
- uberAnim_->StartWeaponShowAnim();
- }
- void obj_Player::StartSpank()
- {
- uberAnim_->StartSpankAnim();
- PKT_C2C_StartSpank_s n;
- p2pSendToHost(this, &n, sizeof(n));
- }
- void obj_Player::StartSpanktwo()
- {
- uberAnim_->StartSpanktwoAnim();
- PKT_C2C_StartSpanktwo_s n;
- p2pSendToHost(this, &n, sizeof(n));
- }
- void obj_Player::StartHandFlip()
- {
- uberAnim_->StartHandFlipAnim();
- PKT_C2C_StartHandFlip_s n;
- p2pSendToHost(this, &n, sizeof(n));
- }
- void obj_Player::StartJack()
- {
- uberAnim_->StartJackAnim();
- PKT_C2C_StartJack_s n;
- p2pSendToHost(this, &n, sizeof(n));
- }
- void obj_Player::StartPThrust()
- {
- uberAnim_->StartPThrustAnim();
- PKT_C2C_StartPThrust_s n;
- p2pSendToHost(this, &n, sizeof(n));
- }
- void obj_Player::StartBigPThrust()
- {
- uberAnim_->StartBigPThrustAnim();
- PKT_C2C_StartBigPThrust_s n;
- p2pSendToHost(this, &n, sizeof(n));
- }
- void obj_Player::StartBalls()
- {
- uberAnim_->StartBallsAnim();
- PKT_C2C_StartBalls_s n;
- p2pSendToHost(this, &n, sizeof(n));
- }
- ---------------------------------------------
- #Search:
- void obj_Player::OnNetPacket(const PKT_C2C_PlayerJump_s& n)
- {
- uberAnim_->StartJump();
- return;
- }
- #Add below:
- void obj_Player::OnNetPacket(const PKT_C2C_StartLitter_s& n)
- {
- uberAnim_->StartLitterAnim();
- return;
- }
- void obj_Player::OnNetPacket(const PKT_C2C_StartSpank_s& n)
- {
- uberAnim_->StartSpankAnim();
- return;
- }
- void obj_Player::OnNetPacket(const PKT_C2C_StartSpanktwo_s& n)
- {
- uberAnim_->StartSpanktwoAnim();
- return;
- }
- void obj_Player::OnNetPacket(const PKT_C2C_StartHandFlip_s& n)
- {
- uberAnim_->StartHandFlipAnim();
- return;
- }
- void obj_Player::OnNetPacket(const PKT_C2C_StartJack_s& n)
- {
- uberAnim_->StartJackAnim();
- return;
- }
- void obj_Player::OnNetPacket(const PKT_C2C_StartPThrust_s& n)
- {
- uberAnim_->StartPThrustAnim();
- return;
- }
- void obj_Player::OnNetPacket(const PKT_C2C_StartBigPThrust_s& n)
- {
- uberAnim_->StartBigPThrustAnim();
- return;
- }
- void obj_Player::OnNetPacket(const PKT_C2C_StartBalls_s& n)
- {
- uberAnim_->StartBallsAnim();
- return;
- }
- /*void obj_Player::OnNetPacket(const PKT_C2C_StartLitter_s& n)
- {
- uberAnim_->StartLitter();
- return;
- }*/
- -----------------------------------------------------------------------
- #Search:
- #define DEFINE_GAMEOBJ_PACKET_HANDLER(xxx) \
- case xxx: { \
- const xxx##_s&n = *(xxx##_s*)packetData; \
- r3d_assert(packetSize == sizeof(n)); \
- OnNetPacket(n); \
- return TRUE; \
- }
- switch(EventID)
- {
- default: return FALSE;
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_S2C_MoveTeleport);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_MoveSetCell);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_MoveRel);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_PlayerJump);
- #Add below:
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartLitter);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartSpank);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartSpanktwo);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartHandFlip);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartJack);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartPThrust);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartBigPThrust);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartBalls);
- --------------------------------------------------------------------
- # Search: AI_Player.H
- // jump stuff
- void DetectIfOnGround();
- r3dSec_type<bool, 0x3F16A388> bOnGround;
- float fHeightAboveGround;
- void StartJump();
- bool IsJumpActive();
- float JumpVelocity;
- float JumpStartTime; // time when we actually need to apply JumpVelocity
- float StartFallingHeight;
- float StartFallingTime;
- #Add below:
- //int TauntTrackID;
- /*void TauntLitter();
- void TauntSpank();
- void TauntSpanktwo();
- void TauntHandFlip();
- void TauntJack();
- void TauntPThrust();
- void TauntBigPThrust();
- void TauntBalls();*/
- void StartLitter();
- void StartWeaponShow();
- void StartSpank();
- void StartSpanktwo();
- void StartHandFlip();
- void StartJack();
- void StartPThrust();
- void StartBigPThrust();
- void StartBalls();
- ---------------------------------------------------------------
- #Search:
- virtual BOOL OnNetReceive(DWORD EventID, const void* packetData, int packetSize);
- void OnNetPacket(const PKT_S2C_MoveTeleport_s& n);
- void OnNetPacket(const PKT_C2C_MoveSetCell_s& n);
- void OnNetPacket(const PKT_C2C_MoveRel_s& n);
- void OnNetPacket(const PKT_C2C_PlayerJump_s& n);
- #Add below:
- void OnNetPacket(const PKT_C2C_StartLitter_s& n);
- void OnNetPacket(const PKT_C2C_StartSpank_s& n);
- void OnNetPacket(const PKT_C2C_StartSpanktwo_s& n);
- void OnNetPacket(const PKT_C2C_StartHandFlip_s& n);
- void OnNetPacket(const PKT_C2C_StartJack_s& n);
- void OnNetPacket(const PKT_C2C_StartPThrust_s& n);
- void OnNetPacket(const PKT_C2C_StartBigPThrust_s& n);
- void OnNetPacket(const PKT_C2C_StartBalls_s& n);
- ------------------------------------------------------------
- #Search:
- void CUberData::LoadDeathAnim()
- {
- /* all this animations is very very wierd
- aid_.deaths[ 0] = AddAnimation("Death_03_t1_SUP_AT4");
- aid_.deaths[ 1] = AddAnimation("Death_04_t1_SUP_RPG");
- aid_.deaths[ 2] = AddAnimation("Death_05_v1_Exp");
- aid_.deaths[ 3] = AddAnimation("Death_01");
- aid_.deaths[ 4] = AddAnimation("Death_01_v2_t1");
- aid_.deaths[ 5] = AddAnimation("Death_01_v2_t2");
- aid_.deaths[ 6] = AddAnimation("Death_01_v5_t1");
- aid_.deaths[ 7] = AddAnimation("Death_01_v6_t1");
- aid_.deaths[ 8] = AddAnimation("Death_01_v7_t1");
- aid_.deaths[ 9] = AddAnimation("Death_01_v8_t1");
- aid_.deaths[10] = AddAnimation("Death_01_v9_t1");
- */
- aid_.deaths[11] = AddAnimation("Death_02_t1");
- aid_.deaths[12] = AddAnimation("Death_02_t1");//AddAnimation("Death_01_v1_s1");
- }
- #Add below:
- void CUberData::LoadTauntAnim()
- {
- aid_.taunts[0] = AddAnimation("Taunt_t1_Litterbox");
- aid_.taunts[1] = AddAnimation("Taunt_t1_Spank");
- aid_.taunts[2] = AddAnimation("Taunt_t1_Spank_02");
- aid_.taunts[3] = AddAnimation("Taunt_t1_HandFlip");
- aid_.taunts[4] = AddAnimation("Taunt_t1_Jack");
- aid_.taunts[5] = AddAnimation("Taunt_t1_PThrust");
- aid_.taunts[6] = AddAnimation("Taunt_t1_Big_PThrust");
- aid_.taunts[7] = AddAnimation("Taunt_t1_Balls");
- aid_.taunts[7] = AddAnimation("Taunt_t1_Balls");
- aid_.taunts[8] = AddAnimation("FPS_Weap_Show");
- }
- -----------------------------------------------------------------
- #Search:
- // add zero index default anim
- AddAnimation("default", "Stand_Aim_ASR_M4");
- LoadLowerAnimations();
- LoadGrenadeAnim();
- LoadJumpAnim();
- LoadDeathAnim();
- #Add below:
- LoadTauntAnim();
- ----------------------------------------------------------------
- #Search:
- void CUberAnim::StartDeathAnim()
- {
- StopReloadAnim();
- StopGrenadeAnimations();
- if(IsSwimming)
- anim.StartAnimation(data_->aid_.deaths[12], ANIMFLAG_PauseOnEnd | ANIMFLAG_RemoveOtherFade, 0.0f, 1.0f, 0.1f);
- else
- anim.StartAnimation(data_->aid_.deaths[11], ANIMFLAG_PauseOnEnd | ANIMFLAG_RemoveOtherFade, 0.0f, 1.0f, 0.1f);
- }
- #Add below:
- void CUberAnim::StartLitterAnim()
- {
- StopReloadAnim();
- //StopGrenadeAnimations();
- anim.StartAnimation(data_->aid_.taunts[0], ANIMFLAG_PauseOnEnd | ANIMFLAG_RemoveOtherFade, 0.0f, 1.0f, 0.1f);
- }
- void CUberAnim::StartWeaponShowAnim()
- {
- StopReloadAnim();
- //StopGrenadeAnimations();
- anim.StartAnimation(data_->aid_.taunts[8], ANIMFLAG_PauseOnEnd | ANIMFLAG_RemoveOtherFade, 0.0f, 1.0f, 0.1f);
- }
- void CUberAnim::StartSpankAnim()
- {
- StopReloadAnim();
- //StopGrenadeAnimations();
- anim.StartAnimation(data_->aid_.taunts[1], ANIMFLAG_PauseOnEnd | ANIMFLAG_RemoveOtherFade, 0.0f, 1.0f, 0.1f);
- }
- void CUberAnim::StartSpanktwoAnim()
- {
- StopReloadAnim();
- //StopGrenadeAnimations();
- anim.StartAnimation(data_->aid_.taunts[2], ANIMFLAG_PauseOnEnd | ANIMFLAG_RemoveOtherFade, 0.0f, 1.0f, 0.1f);
- }
- void CUberAnim::StartHandFlipAnim()
- {
- StopReloadAnim();
- //StopGrenadeAnimations();
- anim.StartAnimation(data_->aid_.taunts[3], ANIMFLAG_PauseOnEnd | ANIMFLAG_RemoveOtherFade, 0.0f, 1.0f, 0.1f);
- }
- void CUberAnim::StartJackAnim()
- {
- StopReloadAnim();
- //StopGrenadeAnimations();
- anim.StartAnimation(data_->aid_.taunts[4], ANIMFLAG_PauseOnEnd | ANIMFLAG_RemoveOtherFade, 0.0f, 1.0f, 0.1f);
- }
- void CUberAnim::StartPThrustAnim()
- {
- StopReloadAnim();
- //StopGrenadeAnimations();
- anim.StartAnimation(data_->aid_.taunts[5], ANIMFLAG_PauseOnEnd | ANIMFLAG_RemoveOtherFade, 0.0f, 1.0f, 0.1f);
- }
- void CUberAnim::StartBigPThrustAnim()
- {
- StopReloadAnim();
- //StopGrenadeAnimations();
- anim.StartAnimation(data_->aid_.taunts[6], ANIMFLAG_PauseOnEnd | ANIMFLAG_RemoveOtherFade, 0.0f, 1.0f, 0.1f);
- }
- void CUberAnim::StartBallsAnim()
- {
- StopReloadAnim();
- //StopGrenadeAnimations();
- anim.StartAnimation(data_->aid_.taunts[7], ANIMFLAG_PauseOnEnd | ANIMFLAG_RemoveOtherFade, 0.0f, 1.0f, 0.1f);
- }
- ----------------------------------------------------------------------------------------
- #Search:
- int turnins[5];
- int grenades_tps[20];
- int grenades_fps[20];
- //int bombs_tps[20];
- //int bombs_fps[20];
- int jumps[20];
- int deaths[20];
- #Add below:
- int taunts[20];
- ------------------------------------------------------------------------------------
- #Search:
- void LoadWeaponAnim(int (&wid)[AIDX_COUNT], int (&wid_fps)[AIDX_COUNT], const char* names[AIDX_COUNT]);
- void LoadGrenadeAnim();
- void LoadJumpAnim();
- void LoadDeathAnim();
- #Add below:
- void LoadTauntAnim();
- ---------------------------------------------------------------------------------------
- #Search:
- float jumpAnimSpeed;
- float jumpStartTimeByState[2];
- float jumpStartTime;
- void StartJump();
- void UpdateJump(bool bOnGround);
- void StartDeathAnim();
- #Add below:
- void StartLitterAnim();
- void StartWeaponShowAnim();
- void StartSpankAnim();
- void StartSpanktwoAnim();
- void StartHandFlipAnim();
- void StartJackAnim();
- void StartPThrustAnim();
- void StartBigPThrustAnim();
- void StartBallsAnim();
- /*void StartLitter();
- void StartSpank();
- void StartSpanktwo();
- void StartHandFlip();
- void StartJack();
- void StartPThrust();
- void StartBigPThrust();
- void StartBalls();*/
- -------------------------------------------------------------------------------------
- # Search: HUD_TPSGame.cpp
- // process jump after assigning InputAcceleration, so that we can predict where player will jump
- if(!disablePlayerMovement)
- {
- if(pl->bOnGround && (InputMappingMngr->wasPressed(r3dInputMappingMngr::KS_JUMP)||Gamepad->WasPressed(gpA))
- //&& !crouching
- && !proning
- && !swimming
- && !pl->IsJumpActive()
- //&& prevAccel.z >= 0 /* prevent jump backward*/
- )
- {
- pl->StartJump(); // BurakDatLife :: Fixed Jump And Prone.
- }
- }
- #Add below:
- if(Keyboard->IsPressed(kbsNumericEnd))
- {
- pl->StartLitter();
- }
- if(Keyboard->IsPressed(kbsF) && g_camera_mode->GetInt()==2)
- {
- pl->StartWeaponShow();
- }
- if(Keyboard->IsPressed(kbsNumericDown))
- {
- pl->StartSpank();
- }
- if(Keyboard->IsPressed(kbsNumericPgDn))
- {
- pl->StartSpanktwo();
- }
- if(Keyboard->IsPressed(kbsNumericLeft))
- {
- pl->StartHandFlip();
- }
- if(Keyboard->IsPressed(kbsNumericFive))
- {
- pl->StartJack();
- }
- if(Keyboard->IsPressed(kbsNumericRight))
- {
- pl->StartPThrust();
- }
- if(Keyboard->IsPressed(kbsNumericHome))
- {
- pl->StartBigPThrust();
- }
- if(Keyboard->IsPressed(kbsNumericUp))
- {
- pl->StartBalls();
- }
- ------------------------------------------------------------------
- #Search:
- // server lockboxes
- PKT_S2C_LockboxOpReq, // request new code or ask for code, or confirm moving item from\to lockbox
- PKT_C2S_LockboxOpAns, // sent new code or send current code for lockbox
- PKT_C2S_LockboxKeyReset, // when owner wants to reset key code
- PKT_S2C_LockboxContent, // server sends a bunch of those for each item in lockbox, once code was accepted
- PKT_C2S_LockboxItemBackpackToLockbox, // request to move item from backpack to lockbox
- PKT_C2S_LockboxItemLockboxToBackpack, // request to mvoe item from lockbox to backpack
- PKT_C2S_LockboxPickup,
- #Add below:
- PKT_C2C_StartLitter,
- PKT_C2C_StartSpank,
- PKT_C2C_StartSpanktwo,
- PKT_C2C_StartHandFlip,
- PKT_C2C_StartJack,
- PKT_C2C_StartPThrust,
- PKT_C2C_StartBigPThrust,
- PKT_C2C_StartBalls,
- -----------------------------------------------------------------------
- #Search:
- struct PKT_C2C_PlayerJump_s : public DefaultPacketMixin<PKT_C2C_PlayerJump>
- {
- };
- #Add below:
- struct PKT_C2C_StartLitter_s : public DefaultPacketMixin<PKT_C2C_StartLitter>
- {
- };
- struct PKT_C2C_StartSpank_s : public DefaultPacketMixin<PKT_C2C_StartSpank>
- {
- };
- struct PKT_C2C_StartSpanktwo_s : public DefaultPacketMixin<PKT_C2C_StartSpanktwo>
- {
- };
- struct PKT_C2C_StartHandFlip_s : public DefaultPacketMixin<PKT_C2C_StartHandFlip>
- {
- };
- struct PKT_C2C_StartJack_s : public DefaultPacketMixin<PKT_C2C_StartJack>
- {
- };
- struct PKT_C2C_StartPThrust_s : public DefaultPacketMixin<PKT_C2C_StartPThrust>
- {
- };
- struct PKT_C2C_StartBigPThrust_s : public DefaultPacketMixin<PKT_C2C_StartBigPThrust>
- {
- };
- struct PKT_C2C_StartBalls_s : public DefaultPacketMixin<PKT_C2C_StartBalls>
- {
- };
- ----------------------------------------------------
- #Search:
- private: // disable access to SetPosition directly, use TeleportPlayer
- void SetPosition(const r3dPoint3D& pos)
- {
- __super::SetPosition(pos);
- }
- bool IsSwimming();
- //bool IsOverWater(float& waterDepth);
- public:
- void TeleportPlayer(const r3dPoint3D& pos);
- void OnNetPacket(const PKT_C2C_PacketBarrier_s& n);
- void OnNetPacket(const PKT_C2C_MoveSetCell_s& n);
- void OnNetPacket(const PKT_C2C_MoveRel_s& n);
- void OnNetPacket(const PKT_C2S_MoveCameraLocation_s& n);
- void OnNetPacket(const PKT_C2C_PlayerJump_s& n);
- #Add below:
- void OnNetPacket(const PKT_C2C_StartLitter_s& n);
- void OnNetPacket(const PKT_C2C_StartSpank_s& n);
- void OnNetPacket(const PKT_C2C_StartSpanktwo_s& n);
- void OnNetPacket(const PKT_C2C_StartHandFlip_s& n);
- void OnNetPacket(const PKT_C2C_StartJack_s& n);
- void OnNetPacket(const PKT_C2C_StartPThrust_s& n);
- void OnNetPacket(const PKT_C2C_StartBigPThrust_s& n);
- void OnNetPacket(const PKT_C2C_StartBalls_s& n);
- ---------------------------
- #Search:
- void obj_ServerPlayer::OnNetPacket(const PKT_C2C_PlayerJump_s& n)
- {
- RelayPacket(&n, sizeof(n), true);
- }
- #Add below:
- void obj_ServerPlayer::OnNetPacket(const PKT_C2C_StartLitter_s& n)
- {
- RelayPacket(&n, sizeof(n), true);
- }
- void obj_ServerPlayer::OnNetPacket(const PKT_C2C_StartSpank_s& n)
- {
- RelayPacket(&n, sizeof(n), true);
- }
- void obj_ServerPlayer::OnNetPacket(const PKT_C2C_StartSpanktwo_s& n)
- {
- RelayPacket(&n, sizeof(n), true);
- }
- void obj_ServerPlayer::OnNetPacket(const PKT_C2C_StartHandFlip_s& n)
- {
- RelayPacket(&n, sizeof(n), true);
- }
- void obj_ServerPlayer::OnNetPacket(const PKT_C2C_StartJack_s& n)
- {
- RelayPacket(&n, sizeof(n), true);
- }
- void obj_ServerPlayer::OnNetPacket(const PKT_C2C_StartPThrust_s& n)
- {
- RelayPacket(&n, sizeof(n), true);
- }
- void obj_ServerPlayer::OnNetPacket(const PKT_C2C_StartBigPThrust_s& n)
- {
- RelayPacket(&n, sizeof(n), true);
- }
- void obj_ServerPlayer::OnNetPacket(const PKT_C2C_StartBalls_s& n)
- {
- RelayPacket(&n, sizeof(n), true);
- }
- ------------------------------------------
- #Search:
- if(tradeTargetId > 0)
- {
- // do not disconnect, we can receive fire packets that was late
- gServerLogic.LogCheat(peerId_, PKT_S2C_CheatWarning_s::CHEAT_Trade, false, "Packet",
- "packet %d", EventID);
- return TRUE;
- }
- switch(EventID)
- {
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_PlayerJump);
- #Add below:
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartLitter);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartSpank);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartSpanktwo);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartHandFlip);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartJack);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartPThrust);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartBigPThrust);
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2C_StartBalls);
- --------------------------------
Add Comment
Please, Sign In to add comment