1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-06-29 08:17:05 +00:00

some script

This commit is contained in:
Nikolay Korolev 2021-01-13 16:01:49 +03:00
parent a7ad2a7e1a
commit 3e198086e3
5 changed files with 316 additions and 264 deletions

View file

@ -360,8 +360,10 @@ public:
static void UndoBuildingSwaps();
static void UndoEntityInvisibilitySettings();
/*
static void ScriptDebugLine3D(float x1, float y1, float z1, float x2, float y2, float z2, uint32 col, uint32 col2);
static void RenderTheScriptDebugLines();
*/
static void SaveAllScripts(uint8*, uint32*);
static void LoadAllScripts(uint8*, uint32);
@ -420,10 +422,12 @@ public:
static void DrawScriptSpheres();
static void HighlightImportantArea(uint32, float, float, float, float, float);
static void HighlightImportantAngledArea(uint32, float, float, float, float, float, float, float, float, float);
/*
static void DrawDebugSquare(float, float, float, float);
static void DrawDebugAngledSquare(float, float, float, float, float, float, float, float);
static void DrawDebugCube(float, float, float, float, float, float);
static void DrawDebugAngledCube(float, float, float, float, float, float, float, float, float, float);
*/
static void AddToInvisibilitySwapArray(CEntity*, bool);
static void AddToBuildingSwapArray(CBuilding*, int32, int32);
@ -432,7 +436,7 @@ public:
static int32 AddScriptSphere(int32 id, CVector pos, float radius);
static int32 GetNewUniqueScriptSphereIndex(int32 index);
static void RemoveScriptSphere(int32 index);
static void RemoveScriptTextureDictionary();
//static void RemoveScriptTextureDictionary();
public:
static void RemoveThisPed(CPed* pPed);
@ -549,7 +553,33 @@ public:
int8 ProcessOneCommand();
void DoDeatharrestCheck();
void UpdateCompareFlag(bool);
void UpdateCompareFlag(bool flag)
{
if (m_bNotFlag)
flag = !flag;
if (m_nAndOrState == ANDOR_NONE) {
m_bCondResult = flag;
return;
}
if (m_nAndOrState >= ANDS_1 && m_nAndOrState <= ANDS_8) {
m_bCondResult &= flag;
if (m_nAndOrState == ANDS_1) {
m_nAndOrState = ANDOR_NONE;
return;
}
}
else if (m_nAndOrState >= ORS_1 && m_nAndOrState <= ORS_8) {
m_bCondResult |= flag;
if (m_nAndOrState == ORS_1) {
m_nAndOrState = ANDOR_NONE;
return;
}
}
else {
return;
}
m_nAndOrState--;
}
int16 GetPadState(uint16, uint16);
int8 ProcessCommands0To99(int32);
@ -570,6 +600,7 @@ public:
int8 ProcessCommands1500To1599(int32);
int8 ProcessCommands1600To1699(int32);
uint32 CollectLocateParameters(uint32*, bool);
void LocatePlayerCommand(int32, uint32*);
void LocatePlayerCharCommand(int32, uint32*);
void LocatePlayerCarCommand(int32, uint32*);

View file

@ -1740,8 +1740,10 @@ int8 CRunningScript::ProcessCommands700To799(int32 command)
UpdateCompareFlag(pPed->bIsShooting && pPed->IsWithinArea(x1, y1, x2, y2));
if (GET_INTEGER_PARAM(5))
CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT);
/*
if (CTheScripts::DbgFlag)
CTheScripts::DrawDebugSquare(x1, y1, x2, y2);
*/
return 0;
}
case COMMAND_IS_CHAR_SHOOTING_IN_AREA:
@ -1756,8 +1758,10 @@ int8 CRunningScript::ProcessCommands700To799(int32 command)
UpdateCompareFlag(pPed->bIsShooting && pPed->IsWithinArea(x1, y1, x2, y2));
if (GET_INTEGER_PARAM(5))
CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT);
/*
if (CTheScripts::DbgFlag)
CTheScripts::DrawDebugSquare(x1, y1, x2, y2);
*/
return 0;
}
case COMMAND_IS_CURRENT_PLAYER_WEAPON:

File diff suppressed because it is too large Load diff

View file

@ -1129,6 +1129,7 @@ void CRadar::SetRadarMarkerState(int32 counter, bool flag)
}
void CRadar::ShowRadarMarker(CVector pos, uint32 color, float radius) {
/*
float f1 = radius * 1.4f;
float f2 = radius * 0.5f;
CVector p1, p2;
@ -1148,6 +1149,7 @@ void CRadar::ShowRadarMarker(CVector pos, uint32 color, float radius) {
p1 = pos - TheCamera.GetRight()*f1;
p2 = pos - TheCamera.GetRight()*f2;
CTheScripts::ScriptDebugLine3D(p1.x, p1.y, p1.z, p2.x, p2.y, p2.z, color, color);
*/
}
void CRadar::ShowRadarTrace(float x, float y, uint32 size, uint8 red, uint8 green, uint8 blue, uint8 alpha)

View file

@ -1275,7 +1275,7 @@ RenderScene(void)
void
RenderDebugShit(void)
{
CTheScripts::RenderTheScriptDebugLines();
//CTheScripts::RenderTheScriptDebugLines();
#ifndef FINAL
if(gbShowCollisionLines)
CRenderer::RenderCollisionLines();