Fix more stuff

This commit is contained in:
LegendaryGuard 2023-07-28 00:29:48 +02:00
parent 1e694cddd6
commit 7b3a83af74
7 changed files with 13 additions and 9 deletions

View file

@ -34,6 +34,7 @@ If you have questions concerning this license or the applicable additional terms
#include "Game_local.h"
#include "Moveable.h"
#include "Projectile.h"
#include "SmokeParticles.h"
/*
===============================================================================
@ -417,14 +418,13 @@ void idMoveable::Killed( idEntity *inflictor, idEntity *attacker, int damage, co
gameLocal.Error( "'projectile_debris' is not an idDebris" );
}
debris = static_cast<idDebris *>(ent);
debris = static_cast<idDebris *>( ent );
debris->randomPosInBounds = true;
debris->randomPosEnt = this;
debris->Create( this, physicsObj.GetOrigin(), dir.ToMat3() );
debris->Launch();
debris->GetRenderEntity()->shaderParms[ SHADERPARM_TIME_OF_DEATH ] = ( gameLocal.time + 1500 ) * 0.001f;
debris->UpdateVisuals();
}
kv = spawnArgs.MatchPrefix( "def_debris", kv );
}

View file

@ -39,6 +39,7 @@ If you have questions concerning this license or the applicable additional terms
#include "PlayerIcon.h"
#include "GameEdit.h"
#include "Moveable.h"
#include "Mover.h"
class idAI;
@ -461,7 +462,7 @@ public:
int Belt2Index(int belt_index); // translate an artitfacts position on the belt to it'sArtifactItem[] index.
// HEXEN : Zeroth
bool StuckToSurface( void );
/*virtual*/ bool StuckToSurface( void );
void SpawnHellions( void );
void UpdateHudAutoMap( void );
void AutoMapChange( idStr mapFloor );

View file

@ -33,6 +33,7 @@ If you have questions concerning this license or the applicable additional terms
#include "physics/Force_Constant.h"
#include "Entity.h"
#include "Game_local.h"
#include "Moveable.h"
/*

View file

@ -959,7 +959,7 @@ idTrigger_Hurt::Save
void idTrigger_Hurt::Save( idSaveGame *savefile ) const {
savefile->WriteBool( on );
savefile->WriteFloat( delay );
savefile->WriteInt( nextTime.Num() );
savefile->WriteInt( (int &) nextTime );
}
/*
@ -970,7 +970,7 @@ idTrigger_Hurt::Restore
void idTrigger_Hurt::Restore( idRestoreGame *savefile ) {
savefile->ReadBool( on );
savefile->ReadFloat( delay );
savefile->ReadInt( nextTime );
savefile->ReadInt( (int &) nextTime );
}
/*
@ -996,7 +996,7 @@ idTrigger_Hurt::Event_Touch
void idTrigger_Hurt::Event_Touch( idEntity *other, trace_t *trace ) {
const char *damage;
if ( on && other && gameLocal.time >= nextTime ) {
if ( on && other && gameLocal.time >= (int &) nextTime ) {
damage = spawnArgs.GetString( "def_damage", "damage_painTrigger" );
other->Damage( NULL, NULL, vec3_origin, damage, 1.0f, INVALID_JOINT, trace->c.point );

View file

@ -149,10 +149,10 @@ void idAI_Golem::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &
}
if ( !inflictor ) {
inflictor = gameLocal.world;
inflictor = (idEntity *) gameLocal.world;
}
if ( !attacker ) {
attacker = gameLocal.world;
attacker = (idEntity *) gameLocal.world;
}
const idDict *damageDef = gameLocal.FindEntityDefDict( damageDefName );

View file

@ -28,6 +28,7 @@ If you have questions concerning this license or the applicable additional terms
#include "sys/platform.h"
#include "gamesys/SysCvar.h"
#include "Actor.h"
#include "Entity.h"
#include "physics/Physics_Player.h"
@ -1433,7 +1434,7 @@ void idPhysics_Player::EvalGravity( void ) {
idVec3 curGrav = gravityVector;
float curTime = MS2SEC( gameLocal.realClientTime );
if ( TransitionToGravity != idVec3(0,0,0) && GetGravityNormal() != TransitionToGravity && nextTransition < curTime ) {
if ( TransitionToGravity != idVec3( 0, 0, 0 ) && GetGravityNormal() != TransitionToGravity && nextTransition < curTime ) {
double gravAmount = sqrt( curGrav.x * curGrav.x + curGrav.y * curGrav.y + curGrav.z * curGrav.z );
idVec3 gravDir = TransitionToGravity * curTransition +
TransitionFromGravity * ( transitions - curTransition );

View file

@ -32,6 +32,7 @@ If you have questions concerning this license or the applicable additional terms
#include "../gamesys/SysCvar.h"
#include "../Player.h"
#include "../Camera.h"
#include "../SmokeParticles.h"
#include "Script_Thread.h"