mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Fix incorrect event/return value for ScriptOrigin::GetAngleEvent
This commit is contained in:
parent
e15440af5e
commit
85da9fabdd
1 changed files with 6 additions and 2 deletions
|
@ -2126,7 +2126,8 @@ Event EV_ScriptOrigin_GetAngle
|
|||
NULL,
|
||||
"get the angles of the entity using just one value.\n"
|
||||
"Gets the yaw of the entity or an up and down\n"
|
||||
"direction if newAngle is [0-359] or -1 or -2"
|
||||
"direction if newAngle is [0-359] or -1 or -2",
|
||||
EV_GETTER
|
||||
);
|
||||
|
||||
CLASS_DECLARATION(ScriptSlave, ScriptOrigin, "script_origin") {
|
||||
|
@ -2173,7 +2174,10 @@ void ScriptOrigin::SetAngleEvent(Event* ev)
|
|||
|
||||
void ScriptOrigin::GetAngleEvent(Event* ev)
|
||||
{
|
||||
ev->AddFloat(G_GetAngle(angles));
|
||||
Vector forward;
|
||||
|
||||
angles.AngleVectorsLeft(&forward);
|
||||
ev->AddFloat(G_GetAngle(forward));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue