summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristei Gabriel <cristei.g772@gmail.com>2023-11-15 06:05:24 +0200
committerCristei Gabriel <cristei.g772@gmail.com>2023-11-15 06:05:24 +0200
commitb0b6f32c17f5efa5b35926430e721735371c3bce (patch)
tree9e27926d10e9e047ef9060922a92b2da2eeea3b9
parent1b100e617c063870e11c8d0e2616c2a0155f06d6 (diff)
make player take bot ducktime & more
-rw-r--r--sourcemod/scripting/bot2player_public.sp18
1 files changed, 13 insertions, 5 deletions
diff --git a/sourcemod/scripting/bot2player_public.sp b/sourcemod/scripting/bot2player_public.sp
index b9a2be6..3dccd34 100644
--- a/sourcemod/scripting/bot2player_public.sp
+++ b/sourcemod/scripting/bot2player_public.sp
@@ -232,15 +232,23 @@ public Action:OnPlayerRunCmd(iClient, &buttons, &impulse, Float:vel[3], Float:an
// note(cristeigabriel): seems to fix getting stuck while
// in position that requires crouching
- int ducked;
- int ducking;
- ducked = GetEntProp(iTarget, Prop_Send, "m_bDucked", 1);
- ducking = GetEntProp(iTarget, Prop_Send, "m_bDucking", 1);
+ int ducked, ducking;
+ float ducktime2, duckjumptime;
+ int injumpduck;
+
+ ducked = GetEntProp(iTarget, Prop_Send, "m_bDucked", 1);
+ ducking = GetEntProp(iTarget, Prop_Send, "m_bDucking", 1);
+ ducktime2 = GetEntPropFloat(iTarget, Prop_Send, "m_flDucktime");
+ duckjumptime = GetEntPropFloat(iTarget, Prop_Send, "m_flDuckJumpTime");
+ injumpduck = GetEntProp(iTarget, Prop_Send, "m_bInDuckJump", 1);
CS_RespawnPlayer(iClient)
SetEntProp(iClient, Prop_Send, "m_bDucked", ducked, 1);
SetEntProp(iClient, Prop_Send, "m_bDucking", ducking, 1);
+ SetEntPropFloat(iClient, Prop_Send, "m_flDucktime", ducktime2);
+ SetEntPropFloat(iClient, Prop_Send, "m_flDuckJumpTime", duckjumptime);
+ SetEntProp(iClient, Prop_Send, "m_bInDuckJump", injumpduck, 1);
TeleportEntity(iClient, iTargetOrigin, iTargetAngles, NULL_VECTOR)
SetConVarInt(NoEndRoundHandle, 0)
@@ -327,7 +335,7 @@ public Action:DisplayTakeOverMessage(Handle:timer, any:iClient)
{
if (ClientCash >= BotTakeverCost[iClient])
{
- PrintHintText(iClient, "Press the Use key [default E] to take control of %s", BotTakeverCost[iClient], BOTName)
+ PrintHintText(iClient, "Press the Use key [default E] to take control of %s", BOTName)
return Plugin_Continue
}
else