Skip to content

Some OOP definitions are incorrect #1583

Open
@qaisjp

Description

@qaisjp

Describe the bug

The following functions have incorrect OOP definitions and should return vectors:

Client

  • CLuaGUIDefs.cpp
    • guiGetPosition
    • guiGetSize
    • guiStaticImageGetNativeSize (missing)
  • CLuaObjectDefs.cpp
    • getObjectScale
  • CLuaPedDefs.cpp
    • getPedWeaponMuzzlePosition (missing)
  • CLuaPointLightDefs.cpp
    • getLightDirection
    • getWaterVertexPosition
  • CLuaRadarAreaDefs
    • getRadarAreaSize (it returns a vector for r.size only, it should also return a vector for r:getSize())
  • CLuaVehicleDefs.cpp
    • getVehicleTurretPosition
  • CLuaWaterDefs
    • getWaterVertexPosition

Server

  • CLuaPlayerDefs
    • getCameraMatrix
  • CLuaPointLightDefs
    • getLightDirection
  • CLuaRadarAreaDefs
    • getRadarAreaSize (as above, in Client)
  • CLuaTextDefs
    • textItemGetPosition
  • CLuaVehicleDefs
    • getVehicleTurretPosition
    • getVehicleRespawnPosition
    • getVehicleRespawnRotation
  • CLuaWaterDefs
    • getWaterVertexPosition

Expected behaviour

Lets take getVehicleTurretPosition as an example. It's in the above list, and that means we need to:

  • Ensure vehicle:getTurretPosition() returns a vector
  • Ensure vehicle.turretPosition returns a vector

Version

1.5.7 r20608

Additional context

This issue was created as part of #1582, which aims to resolve #1240.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions