#include #include #include "common.h" #include "aimstuff.h" #include "address.h" CAMERA_AIM * pcaInternalAim = (CAMERA_AIM *)0xB6F32C; CAMERA_AIM caLocalPlayerAim; CAMERA_AIM caRemotePlayerAim[PLAYER_PED_SLOTS]; extern BYTE * pbyteCameraMode; float * pfStats = (float*)0xB79380; float * pfAspectRatio = (float*)0xC3EFA4; float * pfCameraExtZoom = (float *)0xB6F250; float fCameraExtZoom[PLAYER_PED_SLOTS]; // stored as a normalized multiplier float float fLocalCameraExtZoom; BYTE byteCameraMode[PLAYER_PED_SLOTS]; float fLocalAspectRatio; float fLocalWeaponSkill[11]; float fAspectRatio[PLAYER_PED_SLOTS]; float fWeaponSkill[PLAYER_PED_SLOTS][11]; //---------------------------------------------------------- void __stdcall GameStoreLocalPlayerCameraExtZoom() { fLocalCameraExtZoom = *pfCameraExtZoom; fLocalAspectRatio = *pfAspectRatio; } //---------------------------------------------------------- void __stdcall GameSetLocalPlayerCameraExtZoom() { *pfCameraExtZoom = fLocalCameraExtZoom; *pfAspectRatio = fLocalAspectRatio; } //---------------------------------------------------------- void __stdcall GameSetPlayerCameraExtZoom(BYTE bytePlayerID, float fZoom, float fRatio) { fCameraExtZoom[bytePlayerID] = fZoom; fAspectRatio[bytePlayerID] = fRatio; } //---------------------------------------------------------- float __stdcall GameGetLocalPlayerAspectRatio() { float value = (*pfAspectRatio) - 1.0f; return value; } //---------------------------------------------------------- float __stdcall GameGetLocalPlayerCameraExtZoom() { float value = ((*pfCameraExtZoom) - 35.0f) / 35.0f; // normalize for 35.0 to 70.0 return value; } //---------------------------------------------------------- void __stdcall GameSetRemotePlayerCameraExtZoom(BYTE bytePlayerID) { float fZoom = fCameraExtZoom[bytePlayerID]; float fValue = (fZoom * 35.0f) + 35.0f; // unnormalize for 35.0 to 70.0 *pfCameraExtZoom = fValue; float fRatio = fAspectRatio[bytePlayerID]; float fRatioValue = fRatio + 1.0f; *pfAspectRatio = fRatioValue; } //---------------------------------------------------------- void __stdcall GameSetPlayerCameraMode(BYTE byteMode, BYTE bytePlayerID) { byteCameraMode[bytePlayerID] = byteMode; } //---------------------------------------------------------- BYTE __stdcall GameGetPlayerCameraMode(BYTE bytePlayerID) { return byteCameraMode[bytePlayerID]; } //---------------------------------------------------------- BYTE __stdcall GameGetLocalPlayerCameraMode() { return *pbyteCameraMode; } //---------------------------------------------------------- void __stdcall GameAimSyncInit() { memset(&caLocalPlayerAim,0,sizeof(CAMERA_AIM)); memset(caRemotePlayerAim,0,sizeof(CAMERA_AIM) * PLAYER_PED_SLOTS); memset(byteCameraMode,4,PLAYER_PED_SLOTS); for(int i=0; i