1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 17:10:01 +00:00

PowerPoints

This commit is contained in:
Sergeanur 2020-01-20 18:53:21 +02:00
parent 045c638067
commit d52452e69f
3 changed files with 84 additions and 1 deletions

View file

@ -0,0 +1,22 @@
#include "common.h"
#include "PowerPoints.h"
// Some cut beta feature
void CPowerPoint::Update()
{}
void CPowerPoints::Init()
{}
void CPowerPoints::Update()
{}
void CPowerPoints::GenerateNewOne(float, float, float, float, float, float, uint8)
{}
void CPowerPoints::Save(uint8**, uint32*)
{}
void CPowerPoints::Load(uint8*, uint32)
{}

26
src/control/PowerPoints.h Normal file
View file

@ -0,0 +1,26 @@
#pragma once
enum
{
POWERPOINT_NONE = 0,
POWERPOINT_HEALTH,
POWERPOINT_HIDEOUT_INDUSTRIAL,
POWERPOINT_HIDEOUT_COMMERCIAL,
POWERPOINT_HIDEOUT_SUBURBAN
};
class CPowerPoint
{
public:
void Update();
};
class CPowerPoints
{
public:
static void Init();
static void Update();
static void GenerateNewOne(float, float, float, float, float, float, uint8);
static void Save(uint8**, uint32*);
static void Load(uint8*, uint32);
};

View file

@ -40,6 +40,7 @@
#include "PointLights.h" #include "PointLights.h"
#include "Pools.h" #include "Pools.h"
#include "Population.h" #include "Population.h"
#include "PowerPoints.h"
#include "ProjectileInfo.h" #include "ProjectileInfo.h"
#include "Record.h" #include "Record.h"
#include "Remote.h" #include "Remote.h"
@ -4684,7 +4685,41 @@ int8 CRunningScript::ProcessCommandsFrom500To599(int32 command)
CollectParameters(&m_nIp, 1); CollectParameters(&m_nIp, 1);
CGarages::BombsAreFree = (ScriptParams[0] != 0); CGarages::BombsAreFree = (ScriptParams[0] != 0);
return 0; return 0;
//case COMMAND_SET_POWERPOINT: #ifdef GTA_PS2
case COMMAND_SET_POWERPOINT:
{
CollectParameters(&m_nIp, 7);
float f1 = *(float*)&ScriptParams[0];
float f2 = *(float*)&ScriptParams[1];
float f3 = *(float*)&ScriptParams[2];
float f4 = *(float*)&ScriptParams[3];
float f5 = *(float*)&ScriptParams[4];
float f6 = *(float*)&ScriptParams[5];
float temp;
if (f1 > f4) {
temp = f1;
f1 = f4;
f4 = temp;
}
if (f2 > f5) {
temp = f2;
f2 = f5;
f5 = temp;
}
if (f3 > f6) {
temp = f3;
f3 = f6;
f6 = temp;
}
CPowerPoints::GenerateNewOne(f1, f2, f3, f4, f5, f6, *(uint8*)&ScriptParams[6]);
return 0;
}
#endif // GTA_PS2
case COMMAND_SET_ALL_TAXI_LIGHTS: case COMMAND_SET_ALL_TAXI_LIGHTS:
CollectParameters(&m_nIp, 1); CollectParameters(&m_nIp, 1);
CAutomobile::SetAllTaxiLights(ScriptParams[0] != 0); CAutomobile::SetAllTaxiLights(ScriptParams[0] != 0);