Closed DrVrej closed 1 year ago
NPC:UpdateYaw(speed): Allows us to manually update the yaw without changing the ideal yaw or maintain it, this is different from the existing SetIdealYawAndUpdate! Special value: ( -1 ) = Use the NPC's current max yaw Link: https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/ai_motor.cpp#L742
SetIdealYawAndUpdate
NPC:SetIdealYaw(yaw): Very useful in situation where we don't want the yaw to update yet, currently only way to set it is by calling SetIdealYawAndUpdate, but this also updates it right away which is counter productive in some cases. Link: https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/ai_motor.h#L101
NPC:FacingIdeal(): Helper function that will quickly allow us to know if the NPC is facing its ideal yaw, better to name it as "IsFacingIdealYaw" Link: https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/ai_basenpc.h#L1282
Done.
Details
NPC:UpdateYaw(speed): Allows us to manually update the yaw without changing the ideal yaw or maintain it, this is different from the existing
SetIdealYawAndUpdate
! Special value: ( -1 ) = Use the NPC's current max yaw Link: https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/ai_motor.cpp#L742NPC:SetIdealYaw(yaw): Very useful in situation where we don't want the yaw to update yet, currently only way to set it is by calling
SetIdealYawAndUpdate
, but this also updates it right away which is counter productive in some cases. Link: https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/ai_motor.h#L101NPC:FacingIdeal(): Helper function that will quickly allow us to know if the NPC is facing its ideal yaw, better to name it as "IsFacingIdealYaw" Link: https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/ai_basenpc.h#L1282