MafiaMP icon indicating copy to clipboard operation
MafiaMP copied to clipboard

Override JS player/vehicle GetScale/SetScale methods to only use scalar float

Open zpl-zak opened this issue 2 years ago • 1 comments

Issue Description

  • The current framework codebase uses a Vector3 structure to specify the scale of entity.
  • MafiaMP relies on a scalar floating point value for model scale, which means it uses uniform scaling.

Action Items

  • [ ] Override the setScale and getScale functions within the scripting engine to operate only with scalar floating point values.
  • [ ] Reuse one of the Vector3's three components as a storage for the scalar value.
  • [ ] Ensure that MafiaMP applies the scalar value directly on the client side via an SDK call to scale the entity properly.

zpl-zak avatar Jan 13 '24 18:01 zpl-zak

Check if natives are right: https://github.com/MafiaHub/MafiaMP/blob/6be75b20657e8597828fb11438eb16be5006ff14/code/client/src/sdk/entities/c_actor.h#L21

https://github.com/MafiaHub/MafiaMP/blob/6be75b20657e8597828fb11438eb16be5006ff14/code/client/src/sdk/entities/c_actor.h#L16

Deewarz avatar Jan 14 '24 17:01 Deewarz