1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Update the entity classes to account for the fact that the server ignores the API call completely whenever a null pointer is given for a value that isn't needed.

Add a helper macro to concatenate two macro parameters into one.
This commit is contained in:
Sandu Liviu Catalin 2018-01-30 19:09:54 +02:00
parent 2a5a1821ad
commit cea5995f52
6 changed files with 196 additions and 190 deletions

View File

@ -299,9 +299,9 @@ Float32 CCheckpoint::GetPositionX() const
// Validate the managed identifier
Validate();
// Clear previous position information, if any
Float32 x = 0.0f;
Float32 x = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetCheckPointPosition(m_ID, &x, nullptr, nullptr);
_Func->GetCheckPointPosition(m_ID, &x, &dummy, &dummy);
// Return the requested information
return x;
}
@ -312,9 +312,9 @@ Float32 CCheckpoint::GetPositionY() const
// Validate the managed identifier
Validate();
// Clear previous position information, if any
Float32 y = 0.0f;
Float32 y = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetCheckPointPosition(m_ID, nullptr, &y, nullptr);
_Func->GetCheckPointPosition(m_ID, &dummy, &y, &dummy);
// Return the requested information
return y;
}
@ -325,9 +325,9 @@ Float32 CCheckpoint::GetPositionZ() const
// Validate the managed identifier
Validate();
// Clear previous position information, if any
Float32 z = 0.0f;
Float32 z = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetCheckPointPosition(m_ID, nullptr, nullptr, &z);
_Func->GetCheckPointPosition(m_ID, &dummy, &dummy, &z);
// Return the requested information
return z;
}
@ -338,9 +338,9 @@ void CCheckpoint::SetPositionX(Float32 x) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 y, z;
Float32 y, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetCheckPointPosition(m_ID, nullptr, &y, &z);
_Func->GetCheckPointPosition(m_ID, &dummy, &y, &z);
// Perform the requested operation
_Func->SetCheckPointPosition(m_ID, x, y, z);
}
@ -351,9 +351,9 @@ void CCheckpoint::SetPositionY(Float32 y) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, z;
Float32 x, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetCheckPointPosition(m_ID, &x, nullptr, &z);
_Func->GetCheckPointPosition(m_ID, &x, &dummy, &z);
// Perform the requested operation
_Func->SetCheckPointPosition(m_ID, x, y, z);
}
@ -364,9 +364,9 @@ void CCheckpoint::SetPositionZ(Float32 z) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y;
Float32 x, y, dummy;
// Retrieve the current values for unchanged components
_Func->GetCheckPointPosition(m_ID, &x, &y, nullptr);
_Func->GetCheckPointPosition(m_ID, &x, &y, &dummy);
// Perform the requested operation
_Func->SetCheckPointPosition(m_ID, z, y, z);
}
@ -377,9 +377,9 @@ Int32 CCheckpoint::GetColorR() const
// Validate the managed identifier
Validate();
// Clear previous color information, if any
Int32 r = 0;
Int32 r = 0, dummy;
// Query the server for the requested component value
_Func->GetCheckPointColour(m_ID, &r, nullptr, nullptr, nullptr);
_Func->GetCheckPointColour(m_ID, &r, &dummy, &dummy, &dummy);
// Return the requested information
return r;
}
@ -390,9 +390,9 @@ Int32 CCheckpoint::GetColorG() const
// Validate the managed identifier
Validate();
// Clear previous color information, if any
Int32 g = 0;
Int32 g = 0, dummy;
// Query the server for the requested component value
_Func->GetCheckPointColour(m_ID, nullptr, &g, nullptr, nullptr);
_Func->GetCheckPointColour(m_ID, &dummy, &g, &dummy, &dummy);
// Return the requested information
return g;
}
@ -403,9 +403,9 @@ Int32 CCheckpoint::GetColorB() const
// Validate the managed identifier
Validate();
// Clear previous color information, if any
Int32 b = 0;
Int32 b = 0, dummy;
// Query the server for the requested component value
_Func->GetCheckPointColour(m_ID, nullptr, nullptr, &b, nullptr);
_Func->GetCheckPointColour(m_ID, &dummy, &dummy, &b, &dummy);
// Return the requested information
return b;
}
@ -416,9 +416,9 @@ Int32 CCheckpoint::GetColorA() const
// Validate the managed identifier
Validate();
// Clear previous color information, if any
Int32 a = 0;
Int32 a = 0, dummy;
// Query the server for the requested component value
_Func->GetCheckPointColour(m_ID, nullptr, nullptr, nullptr, &a);
_Func->GetCheckPointColour(m_ID, &dummy, &dummy, &dummy, &a);
// Return the requested information
return a;
}
@ -429,9 +429,9 @@ void CCheckpoint::SetColorR(Int32 r) const
// Validate the managed identifier
Validate();
// Reserve some temporary integers to retrieve the missing components
Int32 g, b, a;
Int32 g, b, a, dummy;
// Retrieve the current values for unchanged components
_Func->GetCheckPointColour(m_ID, nullptr, &g, &b, &a);
_Func->GetCheckPointColour(m_ID, &dummy, &g, &b, &a);
// Perform the requested operation
_Func->SetCheckPointColour(m_ID, r, g, b, a);
}
@ -442,9 +442,9 @@ void CCheckpoint::SetColorG(Int32 g) const
// Validate the managed identifier
Validate();
// Reserve some temporary integers to retrieve the missing components
Int32 r, b, a;
Int32 r, b, a, dummy;
// Retrieve the current values for unchanged components
_Func->GetCheckPointColour(m_ID, &r, nullptr, &b, &a);
_Func->GetCheckPointColour(m_ID, &r, &dummy, &b, &a);
// Perform the requested operation
_Func->SetCheckPointColour(m_ID, r, g, b, a);
}
@ -455,9 +455,9 @@ void CCheckpoint::SetColorB(Int32 b) const
// Validate the managed identifier
Validate();
// Reserve some temporary integers to retrieve the missing components
Int32 r, g, a;
Int32 r, g, a, dummy;
// Retrieve the current values for unchanged components
_Func->GetCheckPointColour(m_ID, &r, &g, nullptr, &a);
_Func->GetCheckPointColour(m_ID, &r, &g, &dummy, &a);
// Perform the requested operation
_Func->SetCheckPointColour(m_ID, r, g, b, a);
}
@ -468,9 +468,9 @@ void CCheckpoint::SetColorA(Int32 a) const
// Validate the managed identifier
Validate();
// Reserve some temporary integers to retrieve the missing components
Int32 r, g, b;
Int32 r, g, b, dummy;
// Retrieve the current values for unchanged components
_Func->GetCheckPointColour(m_ID, &r, &g, &b, nullptr);
_Func->GetCheckPointColour(m_ID, &r, &g, &b, &dummy);
// Perform the requested operation
_Func->SetCheckPointColour(m_ID, r, g, b, a);
}

View File

@ -457,9 +457,9 @@ Float32 CObject::GetPositionX() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 x = 0.0f;
Float32 x = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetObjectPosition(m_ID, &x, nullptr, nullptr);
_Func->GetObjectPosition(m_ID, &x, &dummy, &dummy);
// Return the requested information
return x;
}
@ -470,9 +470,9 @@ Float32 CObject::GetPositionY() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 y = 0.0f;
Float32 y = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetObjectPosition(m_ID, nullptr, &y, nullptr);
_Func->GetObjectPosition(m_ID, &dummy, &y, &dummy);
// Return the requested information
return y;
}
@ -483,9 +483,9 @@ Float32 CObject::GetPositionZ() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 z = 0.0f;
Float32 z = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetObjectPosition(m_ID, nullptr, nullptr, &z);
_Func->GetObjectPosition(m_ID, &dummy, &dummy, &z);
// Return the requested information
return z;
}
@ -496,9 +496,9 @@ void CObject::SetPositionX(Float32 x) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 y, z;
Float32 y, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetObjectPosition(m_ID, nullptr, &y, &z);
_Func->GetObjectPosition(m_ID, &dummy, &y, &z);
// Perform the requested operation
_Func->SetObjectPosition(m_ID, x, y, z);
}
@ -509,9 +509,9 @@ void CObject::SetPositionY(Float32 y) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, z;
Float32 x, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetObjectPosition(m_ID, &x, nullptr, &z);
_Func->GetObjectPosition(m_ID, &x, &dummy, &z);
// Perform the requested operation
_Func->SetObjectPosition(m_ID, x, y, z);
}
@ -522,9 +522,9 @@ void CObject::SetPositionZ(Float32 z) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y;
Float32 x, y, dummy;
// Retrieve the current values for unchanged components
_Func->GetObjectPosition(m_ID, &x, &y, nullptr);
_Func->GetObjectPosition(m_ID, &x, &y, &dummy);
// Perform the requested operation
_Func->SetObjectPosition(m_ID, z, y, z);
}
@ -535,9 +535,9 @@ Float32 CObject::GetRotationX() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 x = 0.0f;
Float32 x = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetObjectRotation(m_ID, &x, nullptr, nullptr, nullptr);
_Func->GetObjectRotation(m_ID, &x, &dummy, &dummy, &dummy);
// Return the requested information
return x;
}
@ -548,9 +548,9 @@ Float32 CObject::GetRotationY() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 y = 0.0f;
Float32 y = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetObjectRotation(m_ID, nullptr, &y, nullptr, nullptr);
_Func->GetObjectRotation(m_ID, &dummy, &y, &dummy, &dummy);
// Return the requested information
return y;
}
@ -561,9 +561,9 @@ Float32 CObject::GetRotationZ() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 z = 0.0f;
Float32 z = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetObjectRotation(m_ID, nullptr, nullptr, &z, nullptr);
_Func->GetObjectRotation(m_ID, &dummy, &dummy, &z, &dummy);
// Return the requested information
return z;
}
@ -574,9 +574,9 @@ Float32 CObject::GetRotationW() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 w = 0.0f;
Float32 w = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetObjectRotation(m_ID, nullptr, nullptr, nullptr, &w);
_Func->GetObjectRotation(m_ID, &dummy, &dummy, &dummy, &w);
// Return the requested information
return w;
}
@ -587,9 +587,9 @@ Float32 CObject::GetEulerRotationX() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 x = 0.0f;
Float32 x = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetObjectRotationEuler(m_ID, &x, nullptr, nullptr);
_Func->GetObjectRotationEuler(m_ID, &x, &dummy, &dummy);
// Return the requested information
return x;
}
@ -600,9 +600,9 @@ Float32 CObject::GetEulerRotationY() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 y = 0.0f;
Float32 y = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetObjectRotationEuler(m_ID, nullptr, &y, nullptr);
_Func->GetObjectRotationEuler(m_ID, &dummy, &y, &dummy);
// Return the requested information
return y;
}
@ -613,9 +613,9 @@ Float32 CObject::GetEulerRotationZ() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 z = 0.0f;
Float32 z = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetObjectRotationEuler(m_ID, nullptr, nullptr, &z);
_Func->GetObjectRotationEuler(m_ID, &dummy, &dummy, &z);
// Return the requested information
return z;
}
@ -626,9 +626,9 @@ void CObject::MoveToX(Float32 x) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 y, z;
Float32 y, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetObjectPosition(m_ID, nullptr, &y, &z);
_Func->GetObjectPosition(m_ID, &dummy, &y, &z);
// Perform the requested operation
_Func->MoveObjectTo(m_ID, x, y, z, mMoveToDuration);
}
@ -639,9 +639,9 @@ void CObject::MoveToY(Float32 y) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, z;
Float32 x, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetObjectPosition(m_ID, &x, nullptr, &z);
_Func->GetObjectPosition(m_ID, &x, &dummy, &z);
// Perform the requested operation
_Func->MoveObjectTo(m_ID, x, y, z, mMoveToDuration);
}
@ -652,9 +652,9 @@ void CObject::MoveToZ(Float32 z) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y;
Float32 x, y, dummy;
// Retrieve the current values for unchanged components
_Func->GetObjectPosition(m_ID, &x, &y, nullptr);
_Func->GetObjectPosition(m_ID, &x, &y, &dummy);
// Perform the requested operation
_Func->MoveObjectTo(m_ID, z, y, z, mMoveToDuration);
}
@ -692,9 +692,9 @@ void CObject::RotateToX(Float32 x) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 y, z, w;
Float32 y, z, w, dummy;
// Retrieve the current values for unchanged components
_Func->GetObjectRotation(m_ID, nullptr, &y, &z, &w);
_Func->GetObjectRotation(m_ID, &dummy, &y, &z, &w);
// Perform the requested operation
_Func->RotateObjectTo(m_ID, x, y, z, w, mRotateToDuration);
}
@ -705,9 +705,9 @@ void CObject::RotateToY(Float32 y) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, z, w;
Float32 x, z, w, dummy;
// Retrieve the current values for unchanged components
_Func->GetObjectRotation(m_ID, &x, nullptr, &z, &w);
_Func->GetObjectRotation(m_ID, &x, &dummy, &z, &w);
// Perform the requested operation
_Func->RotateObjectTo(m_ID, x, y, z, w, mRotateToDuration);
}
@ -718,9 +718,9 @@ void CObject::RotateToZ(Float32 z) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y, w;
Float32 x, y, w, dummy;
// Retrieve the current values for unchanged components
_Func->GetObjectRotation(m_ID, &x, &y, nullptr, &w);
_Func->GetObjectRotation(m_ID, &x, &y, &dummy, &w);
// Perform the requested operation
_Func->RotateObjectTo(m_ID, x, y, z, w, mRotateToDuration);
}
@ -731,9 +731,9 @@ void CObject::RotateToW(Float32 w) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y, z;
Float32 x, y, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetObjectRotation(m_ID, &x, &y, &z, nullptr);
_Func->GetObjectRotation(m_ID, &x, &y, &z, &dummy);
// Perform the requested operation
_Func->RotateObjectTo(m_ID, x, y, z, w, mRotateToDuration);
}
@ -780,9 +780,9 @@ void CObject::RotateToEulerX(Float32 x) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 y, z;
Float32 y, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetObjectRotationEuler(m_ID, nullptr, &y, &z);
_Func->GetObjectRotationEuler(m_ID, &dummy, &y, &z);
// Perform the requested operation
_Func->RotateObjectToEuler(m_ID, x, y, z, mRotateToEulerDuration);
}
@ -793,9 +793,9 @@ void CObject::RotateToEulerY(Float32 y) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, z;
Float32 x, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetObjectRotationEuler(m_ID, &x, nullptr, &z);
_Func->GetObjectRotationEuler(m_ID, &x, &dummy, &z);
// Perform the requested operation
_Func->RotateObjectToEuler(m_ID, x, y, z, mRotateToEulerDuration);
}
@ -806,9 +806,9 @@ void CObject::RotateToEulerZ(Float32 z) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y;
Float32 x, y, dummy;
// Retrieve the current values for unchanged components
_Func->GetObjectRotationEuler(m_ID, &x, &y, nullptr);
_Func->GetObjectRotationEuler(m_ID, &x, &y, &dummy);
// Perform the requested operation
_Func->RotateObjectToEuler(m_ID, z, y, z, mRotateToEulerDuration);
}

View File

@ -328,9 +328,9 @@ Float32 CPickup::GetPositionX() const
// Validate the managed identifier
Validate();
// Clear previous position information, if any
Float32 x = 0.0f;
Float32 x = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetPickupPosition(m_ID, &x, nullptr, nullptr);
_Func->GetPickupPosition(m_ID, &x, &dummy, &dummy);
// Return the requested information
return x;
}
@ -341,9 +341,9 @@ Float32 CPickup::GetPositionY() const
// Validate the managed identifier
Validate();
// Clear previous position information, if any
Float32 y = 0.0f;
Float32 y = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetPickupPosition(m_ID, nullptr, &y, nullptr);
_Func->GetPickupPosition(m_ID, &dummy, &y, &dummy);
// Return the requested information
return y;
}
@ -354,9 +354,9 @@ Float32 CPickup::GetPositionZ() const
// Validate the managed identifier
Validate();
// Clear previous position information, if any
Float32 z = 0.0f;
Float32 z = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetPickupPosition(m_ID, nullptr, nullptr, &z);
_Func->GetPickupPosition(m_ID, &dummy, &dummy, &z);
// Return the requested information
return z;
}
@ -367,9 +367,9 @@ void CPickup::SetPositionX(Float32 x) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 y, z;
Float32 y, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetPickupPosition(m_ID, nullptr, &y, &z);
_Func->GetPickupPosition(m_ID, &dummy, &y, &z);
// Perform the requested operation
_Func->SetPickupPosition(m_ID, x, y, z);
}
@ -380,9 +380,9 @@ void CPickup::SetPositionY(Float32 y) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, z;
Float32 x, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetPickupPosition(m_ID, &x, nullptr, &z);
_Func->GetPickupPosition(m_ID, &x, &dummy, &z);
// Perform the requested operation
_Func->SetPickupPosition(m_ID, x, y, z);
}
@ -393,9 +393,9 @@ void CPickup::SetPositionZ(Float32 z) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y;
Float32 x, y, dummy;
// Retrieve the current values for unchanged components
_Func->GetPickupPosition(m_ID, &x, &y, nullptr);
_Func->GetPickupPosition(m_ID, &x, &y, &dummy);
// Perform the requested operation
_Func->SetPickupPosition(m_ID, z, y, z);
}

View File

@ -1817,9 +1817,9 @@ Float32 CPlayer::GetPositionX() const
// Validate the managed identifier
Validate();
// Reserve a temporary float to retrieve the requested component
Float32 x = 0.0f;
Float32 x = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetPlayerPosition(m_ID, &x, nullptr, nullptr);
_Func->GetPlayerPosition(m_ID, &x, &dummy, &dummy);
// Return the requested information
return x;
}
@ -1830,9 +1830,9 @@ Float32 CPlayer::GetPositionY() const
// Validate the managed identifier
Validate();
// Reserve a temporary float to retrieve the requested component
Float32 y = 0.0f;
Float32 y = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetPlayerPosition(m_ID, nullptr, &y, nullptr);
_Func->GetPlayerPosition(m_ID, &dummy, &y, &dummy);
// Return the requested information
return y;
}
@ -1843,9 +1843,9 @@ Float32 CPlayer::GetPositionZ() const
// Validate the managed identifier
Validate();
// Reserve a temporary float to retrieve the requested component
Float32 z = 0.0f;
Float32 z = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetPlayerPosition(m_ID, nullptr, nullptr, &z);
_Func->GetPlayerPosition(m_ID, &dummy, &dummy, &z);
// Return the requested information
return z;
}
@ -1856,9 +1856,9 @@ void CPlayer::SetPositionX(Float32 x) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 y, z;
Float32 y, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetPlayerPosition(m_ID, nullptr, &y, &z);
_Func->GetPlayerPosition(m_ID, &dummy, &y, &z);
// Perform the requested operation
_Func->SetPlayerPosition(m_ID, x, y, z);
}
@ -1869,9 +1869,9 @@ void CPlayer::SetPositionY(Float32 y) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, z;
Float32 x, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetPlayerPosition(m_ID, &x, nullptr, &z);
_Func->GetPlayerPosition(m_ID, &x, &dummy, &z);
// Perform the requested operation
_Func->SetPlayerPosition(m_ID, x, y, z);
}
@ -1882,9 +1882,9 @@ void CPlayer::SetPositionZ(Float32 z) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y;
Float32 x, y, dummy;
// Retrieve the current values for unchanged components
_Func->GetPlayerPosition(m_ID, &x, &y, nullptr);
_Func->GetPlayerPosition(m_ID, &x, &y, &dummy);
// Perform the requested operation
_Func->SetPlayerPosition(m_ID, z, y, z);
}

View File

@ -1013,9 +1013,9 @@ Float32 CVehicle::GetHorizontalTurretRotation() const
// Validate the managed identifier
Validate();
// Where the rotation value is retrieved
Float32 rot = 0.0f;
Float32 rot = 0.0f, dummy;
// Query the server for the turret rotation value
_Func->GetVehicleTurretRotation(m_ID, &rot, nullptr);
_Func->GetVehicleTurretRotation(m_ID, &rot, &dummy);
// Return the requested information
return rot;
}
@ -1026,9 +1026,9 @@ Float32 CVehicle::GetVerticalTurretRotation() const
// Validate the managed identifier
Validate();
// Where the rotation value is retrieved
Float32 rot = 0.0f;
Float32 rot = 0.0f, dummy;
// Query the server for the turret rotation value
_Func->GetVehicleTurretRotation(m_ID, nullptr, &rot);
_Func->GetVehicleTurretRotation(m_ID, &dummy, &rot);
// Return the requested information
return rot;
}
@ -1292,9 +1292,9 @@ Float32 CVehicle::GetPositionX() const
// Validate the managed identifier
Validate();
// Reserve a temporary float to retrieve the requested component
Float32 x = 0.0f;
Float32 x = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehiclePosition(m_ID, &x, nullptr, nullptr);
_Func->GetVehiclePosition(m_ID, &x, &dummy, &dummy);
// Return the requested information
return x;
}
@ -1305,9 +1305,9 @@ Float32 CVehicle::GetPositionY() const
// Validate the managed identifier
Validate();
// Reserve a temporary float to retrieve the requested component
Float32 y = 0.0f;
Float32 y = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehiclePosition(m_ID, nullptr, &y, nullptr);
_Func->GetVehiclePosition(m_ID, &dummy, &y, &dummy);
// Return the requested information
return y;
}
@ -1318,9 +1318,9 @@ Float32 CVehicle::GetPositionZ() const
// Validate the managed identifier
Validate();
// Reserve a temporary float to retrieve the requested component
Float32 z = 0.0f;
Float32 z = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehiclePosition(m_ID, nullptr, nullptr, &z);
_Func->GetVehiclePosition(m_ID, &dummy, &dummy, &z);
// Return the requested information
return z;
}
@ -1331,9 +1331,9 @@ void CVehicle::SetPositionX(Float32 x) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 y, z;
Float32 y, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehiclePosition(m_ID, nullptr, &y, &z);
_Func->GetVehiclePosition(m_ID, &dummy, &y, &z);
// Perform the requested operation
_Func->SetVehiclePosition(m_ID, x, y, z, false);
}
@ -1344,9 +1344,9 @@ void CVehicle::SetPositionY(Float32 y) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, z;
Float32 x, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehiclePosition(m_ID, &x, nullptr, &z);
_Func->GetVehiclePosition(m_ID, &x, &dummy, &z);
// Perform the requested operation
_Func->SetVehiclePosition(m_ID, x, y, z, false);
}
@ -1357,9 +1357,9 @@ void CVehicle::SetPositionZ(Float32 z) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y;
Float32 x, y, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehiclePosition(m_ID, &x, &y, nullptr);
_Func->GetVehiclePosition(m_ID, &x, &y, &dummy);
// Perform the requested operation
_Func->SetVehiclePosition(m_ID, z, y, z, false);
}
@ -1370,9 +1370,9 @@ Float32 CVehicle::GetRotationX() const
// Validate the managed identifier
Validate();
// Reserve a temporary float to retrieve the requested component
Float32 x = 0.0f;
Float32 x = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleRotation(m_ID, &x, nullptr, nullptr, nullptr);
_Func->GetVehicleRotation(m_ID, &x, &dummy, &dummy, &dummy);
// Return the requested information
return x;
}
@ -1383,9 +1383,9 @@ Float32 CVehicle::GetRotationY() const
// Validate the managed identifier
Validate();
// Reserve a temporary float to retrieve the requested component
Float32 y = 0.0f;
Float32 y = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleRotation(m_ID, nullptr, &y, nullptr, nullptr);
_Func->GetVehicleRotation(m_ID, &dummy, &y, &dummy, &dummy);
// Return the requested information
return y;
}
@ -1396,9 +1396,9 @@ Float32 CVehicle::GetRotationZ() const
// Validate the managed identifier
Validate();
// Reserve a temporary float to retrieve the requested component
Float32 z = 0.0f;
Float32 z = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleRotation(m_ID, nullptr, nullptr, &z, nullptr);
_Func->GetVehicleRotation(m_ID, &dummy, &dummy, &z, &dummy);
// Return the requested information
return z;
}
@ -1409,9 +1409,9 @@ Float32 CVehicle::GetRotationW() const
// Validate the managed identifier
Validate();
// Reserve a temporary float to retrieve the requested component
Float32 w = 0.0f;
Float32 w = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleRotation(m_ID, nullptr, nullptr, nullptr, &w);
_Func->GetVehicleRotation(m_ID, &dummy, &dummy, &dummy, &w);
// Return the requested information
return w;
}
@ -1422,9 +1422,9 @@ void CVehicle::SetRotationX(Float32 x) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 y, z, w;
Float32 y, z, w, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleRotation(m_ID, nullptr, &y, &z, &w);
_Func->GetVehicleRotation(m_ID, &dummy, &y, &z, &w);
// Perform the requested operation
_Func->SetVehicleRotation(m_ID, x, y, z, w);
}
@ -1435,9 +1435,9 @@ void CVehicle::SetRotationY(Float32 y) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, z, w;
Float32 x, z, w, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleRotation(m_ID, &x, nullptr, &z, &w);
_Func->GetVehicleRotation(m_ID, &x, &dummy, &z, &w);
// Perform the requested operation
_Func->SetVehicleRotation(m_ID, x, y, z, w);
}
@ -1448,9 +1448,9 @@ void CVehicle::SetRotationZ(Float32 z) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y, w;
Float32 x, y, w, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleRotation(m_ID, &x, &y, nullptr, &w);
_Func->GetVehicleRotation(m_ID, &x, &y, &dummy, &w);
// Perform the requested operation
_Func->SetVehicleRotation(m_ID, x, y, z, w);
}
@ -1461,9 +1461,9 @@ void CVehicle::SetRotationW(Float32 w) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y, z;
Float32 x, y, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleRotation(m_ID, &x, &y, &z, nullptr);
_Func->GetVehicleRotation(m_ID, &x, &y, &z, &dummy);
// Perform the requested operation
_Func->SetVehicleRotation(m_ID, x, y, z, w);
}
@ -1475,9 +1475,9 @@ Float32 CVehicle::GetEulerRotationX() const
// Validate the managed identifier
Validate();
// Reserve a temporary float to retrieve the requested component
Float32 x = 0.0f;
Float32 x = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleRotationEuler(m_ID, &x, nullptr, nullptr);
_Func->GetVehicleRotationEuler(m_ID, &x, &dummy, &dummy);
// Return the requested information
return x;
}
@ -1488,9 +1488,9 @@ Float32 CVehicle::GetEulerRotationY() const
// Validate the managed identifier
Validate();
// Reserve a temporary float to retrieve the requested component
Float32 y = 0.0f;
Float32 y = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleRotationEuler(m_ID, nullptr, &y, nullptr);
_Func->GetVehicleRotationEuler(m_ID, &dummy, &y, &dummy);
// Return the requested information
return y;
}
@ -1501,9 +1501,9 @@ Float32 CVehicle::GetEulerRotationZ() const
// Validate the managed identifier
Validate();
// Reserve a temporary float to retrieve the requested component
Float32 z = 0.0f;
Float32 z = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleRotationEuler(m_ID, nullptr, nullptr, &z);
_Func->GetVehicleRotationEuler(m_ID, &dummy, &dummy, &z);
// Return the requested information
return z;
}
@ -1514,9 +1514,9 @@ void CVehicle::SetEulerRotationX(Float32 x) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 y, z;
Float32 y, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleRotationEuler(m_ID, nullptr, &y, &z);
_Func->GetVehicleRotationEuler(m_ID, &dummy, &y, &z);
// Perform the requested operation
_Func->SetVehicleRotationEuler(m_ID, x, y, z);
}
@ -1527,9 +1527,9 @@ void CVehicle::SetEulerRotationY(Float32 y) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, z;
Float32 x, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleRotationEuler(m_ID, &x, nullptr, &z);
_Func->GetVehicleRotationEuler(m_ID, &x, &dummy, &z);
// Perform the requested operation
_Func->SetVehicleRotationEuler(m_ID, x, y, z);
}
@ -1540,9 +1540,9 @@ void CVehicle::SetEulerRotationZ(Float32 z) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y;
Float32 x, y, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleRotationEuler(m_ID, &x, &y, nullptr);
_Func->GetVehicleRotationEuler(m_ID, &x, &y, &dummy);
// Perform the requested operation
_Func->SetVehicleRotationEuler(m_ID, z, y, z);
}
@ -1553,9 +1553,9 @@ Float32 CVehicle::GetSpeedX() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 x = 0.0f;
Float32 x = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleSpeed(m_ID, &x, nullptr, nullptr, false);
_Func->GetVehicleSpeed(m_ID, &x, &dummy, &dummy, false);
// Return the requested information
return x;
}
@ -1566,9 +1566,9 @@ Float32 CVehicle::GetSpeedY() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 y = 0.0f;
Float32 y = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleSpeed(m_ID, nullptr, &y, nullptr, false);
_Func->GetVehicleSpeed(m_ID, &dummy, &y, &dummy, false);
// Return the requested information
return y;
}
@ -1579,9 +1579,9 @@ Float32 CVehicle::GetSpeedZ() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 z = 0.0f;
Float32 z = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleSpeed(m_ID, nullptr, nullptr, &z, false);
_Func->GetVehicleSpeed(m_ID, &dummy, &dummy, &z, false);
// Return the requested information
return z;
}
@ -1592,9 +1592,9 @@ void CVehicle::SetSpeedX(Float32 x) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 y, z;
Float32 y, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleSpeed(m_ID, nullptr, &y, &z, false);
_Func->GetVehicleSpeed(m_ID, &dummy, &y, &z, false);
// Perform the requested operation
_Func->SetVehicleSpeed(m_ID, x, y, z, false, false);
}
@ -1605,9 +1605,9 @@ void CVehicle::SetSpeedY(Float32 y) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, z;
Float32 x, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleSpeed(m_ID, &x, nullptr, &z, false);
_Func->GetVehicleSpeed(m_ID, &x, &dummy, &z, false);
// Perform the requested operation
_Func->SetVehicleSpeed(m_ID, x, y, z, false, false);
}
@ -1618,9 +1618,9 @@ void CVehicle::SetSpeedZ(Float32 z) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y;
Float32 x, y, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleSpeed(m_ID, &x, &y, nullptr, false);
_Func->GetVehicleSpeed(m_ID, &x, &y, &dummy, false);
// Perform the requested operation
_Func->SetVehicleSpeed(m_ID, z, y, z, false, false);
}
@ -1631,9 +1631,9 @@ Float32 CVehicle::GetRelativeSpeedX() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 x = 0.0f;
Float32 x = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleSpeed(m_ID, &x, nullptr, nullptr, true);
_Func->GetVehicleSpeed(m_ID, &x, &dummy, &dummy, true);
// Return the requested information
return x;
}
@ -1644,9 +1644,9 @@ Float32 CVehicle::GetRelativeSpeedY() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 y = 0.0f;
Float32 y = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleSpeed(m_ID, nullptr, &y, nullptr, true);
_Func->GetVehicleSpeed(m_ID, &dummy, &y, &dummy, true);
// Return the requested information
return y;
}
@ -1657,9 +1657,9 @@ Float32 CVehicle::GetRelativeSpeedZ() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 z = 0.0f;
Float32 z = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleSpeed(m_ID, nullptr, nullptr, &z, true);
_Func->GetVehicleSpeed(m_ID, &dummy, &dummy, &z, true);
// Return the requested information
return z;
}
@ -1670,9 +1670,9 @@ void CVehicle::SetRelativeSpeedX(Float32 x) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 y, z;
Float32 y, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleSpeed(m_ID, nullptr, &y, &z, true);
_Func->GetVehicleSpeed(m_ID, &dummy, &y, &z, true);
// Perform the requested operation
_Func->SetVehicleSpeed(m_ID, x, y, z, false, true);
}
@ -1683,9 +1683,9 @@ void CVehicle::SetRelativeSpeedY(Float32 y) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, z;
Float32 x, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleSpeed(m_ID, &x, nullptr, &z, true);
_Func->GetVehicleSpeed(m_ID, &x, &dummy, &z, true);
// Perform the requested operation
_Func->SetVehicleSpeed(m_ID, x, y, z, false, true);
}
@ -1696,9 +1696,9 @@ void CVehicle::SetRelativeSpeedZ(Float32 z) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y;
Float32 x, y, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleSpeed(m_ID, &x, &y, nullptr, true);
_Func->GetVehicleSpeed(m_ID, &x, &y, &dummy, true);
// Perform the requested operation
_Func->SetVehicleSpeed(m_ID, z, y, z, false, true);
}
@ -1709,9 +1709,9 @@ Float32 CVehicle::GetTurnSpeedX() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 x = 0.0f;
Float32 x = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleTurnSpeed(m_ID, &x, nullptr, nullptr, false);
_Func->GetVehicleTurnSpeed(m_ID, &x, &dummy, &dummy, false);
// Return the requested information
return x;
}
@ -1722,9 +1722,9 @@ Float32 CVehicle::GetTurnSpeedY() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 y = 0.0f;
Float32 y = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleTurnSpeed(m_ID, nullptr, &y, nullptr, false);
_Func->GetVehicleTurnSpeed(m_ID, &dummy, &y, &dummy, false);
// Return the requested information
return y;
}
@ -1735,9 +1735,9 @@ Float32 CVehicle::GetTurnSpeedZ() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 z = 0.0f;
Float32 z = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleTurnSpeed(m_ID, nullptr, nullptr, &z, false);
_Func->GetVehicleTurnSpeed(m_ID, &dummy, &dummy, &z, false);
// Return the requested information
return z;
}
@ -1748,9 +1748,9 @@ void CVehicle::SetTurnSpeedX(Float32 x) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 y, z;
Float32 y, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleTurnSpeed(m_ID, nullptr, &y, &z, false);
_Func->GetVehicleTurnSpeed(m_ID, &dummy, &y, &z, false);
// Perform the requested operation
_Func->SetVehicleTurnSpeed(m_ID, x, y, z, false, false);
}
@ -1761,9 +1761,9 @@ void CVehicle::SetTurnSpeedY(Float32 y) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, z;
Float32 x, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleTurnSpeed(m_ID, &x, nullptr, &z, false);
_Func->GetVehicleTurnSpeed(m_ID, &x, &dummy, &z, false);
// Perform the requested operation
_Func->SetVehicleTurnSpeed(m_ID, x, y, z, false, false);
}
@ -1774,9 +1774,9 @@ void CVehicle::SetTurnSpeedZ(Float32 z) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y;
Float32 x, y, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleTurnSpeed(m_ID, &x, &y, nullptr, false);
_Func->GetVehicleTurnSpeed(m_ID, &x, &y, &dummy, false);
// Perform the requested operation
_Func->SetVehicleTurnSpeed(m_ID, z, y, z, false, false);
}
@ -1787,9 +1787,9 @@ Float32 CVehicle::GetRelativeTurnSpeedX() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 x = 0.0f;
Float32 x = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleTurnSpeed(m_ID, &x, nullptr, nullptr, true);
_Func->GetVehicleTurnSpeed(m_ID, &x, &dummy, &dummy, true);
// Return the requested information
return x;
}
@ -1800,9 +1800,9 @@ Float32 CVehicle::GetRelativeTurnSpeedY() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 y = 0.0f;
Float32 y = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleTurnSpeed(m_ID, nullptr, &y, nullptr, true);
_Func->GetVehicleTurnSpeed(m_ID, &dummy, &y, &dummy, true);
// Return the requested information
return y;
}
@ -1813,9 +1813,9 @@ Float32 CVehicle::GetRelativeTurnSpeedZ() const
// Validate the managed identifier
Validate();
// Clear previous information, if any
Float32 z = 0.0f;
Float32 z = 0.0f, dummy;
// Query the server for the requested component value
_Func->GetVehicleTurnSpeed(m_ID, nullptr, nullptr, &z, true);
_Func->GetVehicleTurnSpeed(m_ID, &dummy, &dummy, &z, true);
// Return the requested information
return z;
}
@ -1826,9 +1826,9 @@ void CVehicle::SetRelativeTurnSpeedX(Float32 x) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 y, z;
Float32 y, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleTurnSpeed(m_ID, nullptr, &y, &z, true);
_Func->GetVehicleTurnSpeed(m_ID, &dummy, &y, &z, true);
// Perform the requested operation
_Func->SetVehicleTurnSpeed(m_ID, x, y, z, false, true);
}
@ -1839,9 +1839,9 @@ void CVehicle::SetRelativeTurnSpeedY(Float32 y) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, z;
Float32 x, z, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleTurnSpeed(m_ID, &x, nullptr, &z, true);
_Func->GetVehicleTurnSpeed(m_ID, &x, &dummy, &z, true);
// Perform the requested operation
_Func->SetVehicleTurnSpeed(m_ID, x, y, z, false, true);
}
@ -1852,9 +1852,9 @@ void CVehicle::SetRelativeTurnSpeedZ(Float32 z) const
// Validate the managed identifier
Validate();
// Reserve some temporary floats to retrieve the missing components
Float32 x, y;
Float32 x, y, dummy;
// Retrieve the current values for unchanged components
_Func->GetVehicleTurnSpeed(m_ID, &x, &y, nullptr, true);
_Func->GetVehicleTurnSpeed(m_ID, &x, &y, &dummy, true);
// Perform the requested operation
_Func->SetVehicleTurnSpeed(m_ID, z, y, z, false, true);
}

View File

@ -449,6 +449,12 @@ enum EntityType
} // Namespace:: SqMod
/* ------------------------------------------------------------------------------------------------
* HELPERS
*/
#define SQMOD_CONCAT_(a,b) a##b
#define SQMOD_CONCAT(a,b) SQMOD_CONCAT_(a,b)
/* ------------------------------------------------------------------------------------------------
* OS SPECIFFIC OPTIONS
*/