Skip to content
Closed
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
926efcf
Add modifications of the Damage functions and change some ammo variab…
LegendaryGuard Jul 23, 2023
835ccde
Add part of modifications of Damage and TestMelee functions in d3xp: …
LegendaryGuard Jul 23, 2023
cdc61a1
Add modified source code in framework and game directory (part 1)
LegendaryGuard Jul 24, 2023
e2d9b1d
Add 2 new files and modified player source code in game directory (pa…
LegendaryGuard Jul 24, 2023
b6b8a04
Add modified source code in game directory (part 3)
LegendaryGuard Jul 26, 2023
0e0bdc0
Add modified source code in game directory (part 4)
LegendaryGuard Jul 26, 2023
b1176b9
Convert the new added files from CRLF into LF and add modified source…
LegendaryGuard Jul 26, 2023
f9ca75f
Add modified source code in idlib
LegendaryGuard Jul 26, 2023
ef92e10
Add new source files in CMakeLists.txt
LegendaryGuard Jul 26, 2023
e29278f
Fix some stuff when trying to compile in Linux, remove applied #inclu…
LegendaryGuard Jul 26, 2023
1e694cd
Fix some stuff
LegendaryGuard Jul 27, 2023
7b3a83a
Fix more stuff
LegendaryGuard Jul 27, 2023
652fe79
Finally fix all errors, important: keep other classes in the correspo…
LegendaryGuard Jul 28, 2023
3a03b7b
Fix an error detected by Linux, &idEntity() can't be used. End of the…
LegendaryGuard Jul 28, 2023
02eddc5
Change the name of the compiled mod dll file
LegendaryGuard Jul 28, 2023
e1f6760
Clean up #include files in the code and disable some annoying asserti…
LegendaryGuard Jul 30, 2023
e6b192d
Fix alternatively the crash of when player picks up an item, somethin…
LegendaryGuard Jul 31, 2023
8928511
Disable other annoying assertion using #ifdef _DEBUG && 0
LegendaryGuard Jul 31, 2023
3ffc594
Change to README for HeXen: Edge Of Chaos
LegendaryGuard Jul 31, 2023
ffce9ca
load savegame
glKarin Nov 23, 2023
73d31bc
Merge pull request #2 from glKarin/patch-1
LegendaryGuard Mar 1, 2024
682cd5d
Merge branch 'master' into hexeneoc
LegendaryGuard Apr 18, 2024
164283a
Merge branch 'master' into hexeneoc
LegendaryGuard Aug 3, 2024
f924ef8
Fix newgranularity variable when using debug build
LegendaryGuard Aug 4, 2024
be7bac0
Fix idItem::GiveToPlayer in CallFunc function when picking up items l…
LegendaryGuard Aug 4, 2024
c511633
Change and fix when compiling debug builds with asserts, now disabled…
LegendaryGuard Aug 4, 2024
cf7dd5f
Add HEOC credits
LegendaryGuard Dec 23, 2025
e790cb9
Fix idItem::GiveToPlayer again, this time with function checks
LegendaryGuard Dec 25, 2025
7dfacbc
Rewrite, add license notes and give thanks to the main HEOC coder for…
LegendaryGuard Jan 5, 2026
e8e0e94
Add the last pieces of code of game/Trigger.cpp from HEOC and fix 'ne…
LegendaryGuard Jan 6, 2026
83b0423
Remove disabling macros in the assertions
LegendaryGuard Jan 6, 2026
e8640db
Update CMakeLists.txt
LegendaryGuard Jan 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8...3.22 FATAL_ERROR)
project(dhewm3sdk)

option(BASE "Build the base (game/) game code" ON)
set(BASE_NAME "base" CACHE STRING "Name of the mod built from game/ (will result in \${BASE_NAME}.dll)")
set(BASE_NAME "eoc" CACHE STRING "Name of the mod built from game/ (will result in \${BASE_NAME}.dll)")
set(BASE_DEFS "GAME_DLL" CACHE STRING "Compiler definitions for the mod built from game/")

option(D3XP "Build the d3xp/ game code" ON)
Expand Down Expand Up @@ -374,7 +374,9 @@ set(src_game
game/Moveable.cpp
game/MultiplayerGame.cpp
game/Player.cpp
game/PlayerArtifacts.cpp
game/PlayerIcon.cpp
game/PlayerScriptEvents.cpp
game/PlayerView.cpp
game/Projectile.cpp
game/Pvs.cpp
Expand All @@ -392,6 +394,9 @@ set(src_game
game/ai/AI.cpp
game/ai/AI_events.cpp
game/ai/AI_pathing.cpp
game/ai/AI_Golem.cpp
game/ai/AI_Shadowspawn.cpp
game/ai/AI_Veloxite.cpp
game/ai/AI_Vagary.cpp
game/gamesys/DebugGraph.cpp
game/gamesys/Class.cpp
Expand Down Expand Up @@ -425,6 +430,12 @@ set(src_game
game/physics/Physics_Static.cpp
game/physics/Physics_StaticMulti.cpp
game/physics/Push.cpp
game/objects/Leaf.cpp
game/objects/LeafEmitter.cpp
game/objects/Tree.cpp
game/projectiles/FireStorm.cpp
game/projectiles/Soul.cpp
game/projectiles/Wraithverge.cpp

${src_game_mod}
)
Expand Down
492 changes: 120 additions & 372 deletions README.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions d3xp/AFEntity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,10 @@ Pass damage to body at the bindjoint
============
*/
void idAFAttachment::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir,
const char *damageDefName, const float damageScale, const int location ) {
const char *damageDefName, const float damageScale, const int location, const idVec3 &iPoint ) {

if ( body ) {
body->Damage( inflictor, attacker, dir, damageDefName, damageScale, attachJoint );
body->Damage( inflictor, attacker, dir, damageDefName, damageScale, attachJoint, iPoint );
}
}

Expand Down Expand Up @@ -1100,11 +1100,11 @@ void idAFEntity_Gibbable::Present( void ) {
idAFEntity_Gibbable::Damage
================
*/
void idAFEntity_Gibbable::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location ) {
void idAFEntity_Gibbable::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location, idVec3 &iPoint ) {
if ( !fl.takedamage ) {
return;
}
idAFEntity_Base::Damage( inflictor, attacker, dir, damageDefName, damageScale, location );
idAFEntity_Base::Damage( inflictor, attacker, dir, damageDefName, damageScale, location, iPoint );
if ( health < -20 && spawnArgs.GetBool( "gib" ) ) {
Gib( dir, damageDefName );
}
Expand Down Expand Up @@ -1147,7 +1147,7 @@ bool idAFEntity_Gibbable::Collide( const trace_t &collision, const idVec3 &veloc

ent = gameLocal.entities[ collision.c.entityNum ];
if ( ent->fl.takedamage ) {
ent->Damage( this, gameLocal.GetLocalPlayer(), collision.c.normal, "damage_thrown_ragdoll", 1.f, CLIPMODEL_ID_TO_JOINT_HANDLE( collision.c.id ) );
ent->Damage( this, gameLocal.GetLocalPlayer(), collision.c.normal, "damage_thrown_ragdoll", 1.f, CLIPMODEL_ID_TO_JOINT_HANDLE( collision.c.id ), idVec3( collision.c.point ) );
}

idVec3 vel = velocity;
Expand Down
4 changes: 2 additions & 2 deletions d3xp/AFEntity.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class idAFAttachment : public idAnimatedEntity {
virtual void ApplyImpulse( idEntity *ent, int id, const idVec3 &point, const idVec3 &impulse );
virtual void AddForce( idEntity *ent, int id, const idVec3 &point, const idVec3 &force );

virtual void Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location );
virtual void Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location, const idVec3 &iPoint );
virtual void AddDamageEffect( const trace_t &collision, const idVec3 &velocity, const char *damageDefName );

void SetCombatModel( void );
Expand Down Expand Up @@ -225,7 +225,7 @@ class idAFEntity_Gibbable : public idAFEntity_Base {
void Save( idSaveGame *savefile ) const;
void Restore( idRestoreGame *savefile );
virtual void Present( void );
virtual void Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location );
virtual void Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location, idVec3 &iPoint );
#ifdef _D3XP
void SetThrown( bool isThrown );
virtual bool Collide( const trace_t &collision, const idVec3 &velocity );
Expand Down
2 changes: 1 addition & 1 deletion d3xp/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,7 @@ calls Damage()
============
*/
void idActor::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir,
const char *damageDefName, const float damageScale, const int location ) {
const char *damageDefName, const float damageScale, const int location, const idVec3 &iPoint ) {
if ( !fl.takedamage ) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion d3xp/Actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class idActor : public idAFEntity_Gibbable {

// damage
void SetupDamageGroups( void );
virtual void Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location );
virtual void Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location, const idVec3 &iPoint );
int GetDamageForLocation( int damage, int location );
const char * GetDamageGroup( int location );
void ClearPain( void );
Expand Down
2 changes: 1 addition & 1 deletion d3xp/Entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3072,7 +3072,7 @@ inflictor, attacker, dir, and point can be NULL for environmental effects
============
*/
void idEntity::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir,
const char *damageDefName, const float damageScale, const int location ) {
const char *damageDefName, const float damageScale, const int location, const idVec3 &iPoint ) {
if ( !fl.takedamage ) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion d3xp/Entity.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class idEntity : public idClass {
// returns true if this entity can be damaged from the given origin
virtual bool CanDamage( const idVec3 &origin, idVec3 &damagePoint ) const;
// applies damage to this entity
virtual void Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location );
virtual void Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location, const idVec3 &iPoint );
// adds a damage effect like overlays, blood, sparks, debris etc.
virtual void AddDamageEffect( const trace_t &collision, const idVec3 &velocity, const char *damageDefName );
// callback function for when another entity received damage from this entity. damage can be adjusted and returned to the caller.
Expand Down
4 changes: 2 additions & 2 deletions d3xp/Game_local.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3811,7 +3811,7 @@ void idGameLocal::KillBox( idEntity *ent, bool catch_teleport ) {
if ( hit->IsType( idPlayer::Type ) && static_cast< idPlayer * >( hit )->IsInTeleport() ) {
static_cast< idPlayer * >( hit )->TeleportDeath( ent->entityNumber );
} else if ( !catch_teleport ) {
hit->Damage( ent, ent, vec3_origin, "damage_telefrag", 1.0f, INVALID_JOINT );
hit->Damage( ent, ent, vec3_origin, "damage_telefrag", 1.0f, INVALID_JOINT, idVec3( 0, 0, 0 ) );
}

if ( !gameLocal.isMultiplayer ) {
Expand Down Expand Up @@ -3974,7 +3974,7 @@ void idGameLocal::RadiusDamage( const idVec3 &origin, idEntity *inflictor, idEnt
damageScale *= attackerDamageScale;
}

ent->Damage( inflictor, attacker, dir, damageDefName, damageScale, INVALID_JOINT );
ent->Damage( inflictor, attacker, dir, damageDefName, damageScale, INVALID_JOINT, idVec3( 0, 0, 0 ) );
}
}

Expand Down
2 changes: 1 addition & 1 deletion d3xp/Grabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ void idGrabber::StopDrag( bool dropOnly ) {
if ( grabbableAI( ent->spawnArgs.GetString( "classname" ) ) ) {
idAI *aiEnt = static_cast<idAI*>(ent);

aiEnt->Damage( thePlayer, thePlayer, vec3_origin, "damage_suicide", 1.0f, INVALID_JOINT );
aiEnt->Damage( thePlayer, thePlayer, vec3_origin, "damage_suicide", 1.0f, INVALID_JOINT, idVec3( 0, 0, 0 ) );
}

af->SetThrown( !dropOnly );
Expand Down
2 changes: 1 addition & 1 deletion d3xp/Misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3400,7 +3400,7 @@ void idShockwave::Think() {
idPlayer* player = static_cast< idPlayer* >( ent );
idVec3 dir = ent->GetPhysics()->GetOrigin() - pos;
dir.NormalizeFast();
player->Damage(NULL, NULL, dir, damageDef, 1.0f, INVALID_JOINT);
player->Damage(NULL, NULL, dir, damageDef, 1.0f, INVALID_JOINT, idVec3( 0, 0, 0 ));
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions d3xp/Moveable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,13 @@ bool idMoveable::Collide( const trace_t &collision, const idVec3 &velocity ) {
if ( ent->IsType( idAI::Type ) && hasMonsterDamage ) {
#ifdef _D3XP
if ( attacker ) {
ent->Damage( this, attacker, dir, monsterDamage, f, INVALID_JOINT );
ent->Damage( this, attacker, dir, monsterDamage, f, INVALID_JOINT, idVec3( collision.c.point ) );
}
else {
ent->Damage( this, GetPhysics()->GetClipModel()->GetOwner(), dir, monsterDamage, f, INVALID_JOINT );
ent->Damage( this, GetPhysics()->GetClipModel()->GetOwner(), dir, monsterDamage, f, INVALID_JOINT, idVec3( collision.c.point ) );
}
#else
ent->Damage( this, GetPhysics()->GetClipModel()->GetOwner(), dir, monsterDamage, f, INVALID_JOINT );
ent->Damage( this, GetPhysics()->GetClipModel()->GetOwner(), dir, monsterDamage, f, INVALID_JOINT, idVec3( collision.c.point ) );
#endif
} else if ( hasDamage ) {
#ifdef _D3XP
Expand All @@ -330,13 +330,13 @@ bool idMoveable::Collide( const trace_t &collision, const idVec3 &velocity ) {
}

if ( attacker ) {
ent->Damage( this, attacker, dir, damage, f, INVALID_JOINT );
ent->Damage( this, attacker, dir, damage, f, INVALID_JOINT, idVec3( collision.c.point ) );
}
else {
ent->Damage( this, GetPhysics()->GetClipModel()->GetOwner(), dir, damage, f, INVALID_JOINT );
ent->Damage( this, GetPhysics()->GetClipModel()->GetOwner(), dir, damage, f, INVALID_JOINT, idVec3( collision.c.point ) );
}
#else
ent->Damage( this, GetPhysics()->GetClipModel()->GetOwner(), dir, damage, f, INVALID_JOINT );
ent->Damage( this, GetPhysics()->GetClipModel()->GetOwner(), dir, damage, f, INVALID_JOINT, idVec3( collision.c.point ) );
#endif
}

Expand Down Expand Up @@ -1229,7 +1229,7 @@ idExplodingBarrel::Damage
================
*/
void idExplodingBarrel::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir,
const char *damageDefName, const float damageScale, const int location ) {
const char *damageDefName, const float damageScale, const int location, const idVec3 &iPoint ) {

const idDict *damageDef = gameLocal.FindEntityDefDict( damageDefName );
if ( !damageDef ) {
Expand All @@ -1238,7 +1238,7 @@ void idExplodingBarrel::Damage( idEntity *inflictor, idEntity *attacker, const i
if ( damageDef->FindKey( "radius" ) && GetPhysics()->GetContents() != 0 && GetBindMaster() == NULL ) {
PostEventMS( &EV_Explode, 400 );
} else {
idEntity::Damage( inflictor, attacker, dir, damageDefName, damageScale, location );
idEntity::Damage( inflictor, attacker, dir, damageDefName, damageScale, location, iPoint );
}
}

Expand Down
2 changes: 1 addition & 1 deletion d3xp/Moveable.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class idExplodingBarrel : public idBarrel {

virtual void Think( void );
virtual void Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir,
const char *damageDefName, const float damageScale, const int location );
const char *damageDefName, const float damageScale, const int location, const idVec3 &iPoint );
virtual void Killed( idEntity *inflictor, idEntity *attacker, int damage, const idVec3 &dir, int location );

virtual void WriteToSnapshot( idBitMsgDelta &msg ) const;
Expand Down
8 changes: 4 additions & 4 deletions d3xp/Mover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ idMover::Event_PartBlocked
*/
void idMover::Event_PartBlocked( idEntity *blockingEntity ) {
if ( damage > 0.0f ) {
blockingEntity->Damage( this, this, vec3_origin, "damage_moverCrush", damage, INVALID_JOINT );
blockingEntity->Damage( this, this, vec3_origin, "damage_moverCrush", damage, INVALID_JOINT, idVec3( 0, 0, 0 ) );
}
if ( g_debugMover.GetBool() ) {
gameLocal.Printf( "%d: '%s' blocked by '%s'\n", gameLocal.slow.time, name.c_str(), blockingEntity->name.c_str() );
Expand Down Expand Up @@ -3843,7 +3843,7 @@ idDoor::Event_PartBlocked
*/
void idDoor::Event_PartBlocked( idEntity *blockingEntity ) {
if ( damage > 0.0f ) {
blockingEntity->Damage( this, this, vec3_origin, "damage_moverCrush", damage, INVALID_JOINT );
blockingEntity->Damage( this, this, vec3_origin, "damage_moverCrush", damage, INVALID_JOINT, idVec3( 0, 0, 0 ) );
}
}

Expand Down Expand Up @@ -4286,7 +4286,7 @@ idPlat::Event_PartBlocked
*/
void idPlat::Event_PartBlocked( idEntity *blockingEntity ) {
if ( damage > 0.0f ) {
blockingEntity->Damage( this, this, vec3_origin, "damage_moverCrush", damage, INVALID_JOINT );
blockingEntity->Damage( this, this, vec3_origin, "damage_moverCrush", damage, INVALID_JOINT, idVec3( 0, 0, 0 ) );
}
}

Expand Down Expand Up @@ -4377,7 +4377,7 @@ idMover_Periodic::Event_PartBlocked
*/
void idMover_Periodic::Event_PartBlocked( idEntity *blockingEntity ) {
if ( damage > 0.0f ) {
blockingEntity->Damage( this, this, vec3_origin, "damage_moverCrush", damage, INVALID_JOINT );
blockingEntity->Damage( this, this, vec3_origin, "damage_moverCrush", damage, INVALID_JOINT, idVec3( 0, 0, 0 ) );
}
}

Expand Down
14 changes: 7 additions & 7 deletions d3xp/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5667,23 +5667,23 @@ void idPlayer::CrashLand( const idVec3 &oldOrigin, const idVec3 &oldVelocity ) {
landTime = gameLocal.time;
if ( !noDamage ) {
pain_debounce_time = gameLocal.time + pain_delay + 1; // ignore pain since we'll play our landing anim
Damage( NULL, NULL, idVec3( 0, 0, -1 ), "damage_fatalfall", 1.0f, 0 );
Damage( NULL, NULL, idVec3( 0, 0, -1 ), "damage_fatalfall", 1.0f, 0, idVec3( 0, 0, 0 ) );
}
} else if ( delta > hardDelta ) {
AI_HARDLANDING = true;
landChange = -24;
landTime = gameLocal.time;
if ( !noDamage ) {
pain_debounce_time = gameLocal.time + pain_delay + 1; // ignore pain since we'll play our landing anim
Damage( NULL, NULL, idVec3( 0, 0, -1 ), "damage_hardfall", 1.0f, 0 );
Damage( NULL, NULL, idVec3( 0, 0, -1 ), "damage_hardfall", 1.0f, 0, idVec3( 0, 0, 0 ) );
}
} else if ( delta > 30 ) {
AI_HARDLANDING = true;
landChange = -16;
landTime = gameLocal.time;
if ( !noDamage ) {
pain_debounce_time = gameLocal.time + pain_delay + 1; // ignore pain since we'll play our landing anim
Damage( NULL, NULL, idVec3( 0, 0, -1 ), "damage_softfall", 1.0f, 0 );
Damage( NULL, NULL, idVec3( 0, 0, -1 ), "damage_softfall", 1.0f, 0, idVec3( 0, 0, 0 ) );
}
} else if ( delta > 7 ) {
AI_SOFTLANDING = true;
Expand Down Expand Up @@ -6099,7 +6099,7 @@ void idPlayer::UpdateAir( void ) {
const idDict *damageDef = gameLocal.FindEntityDefDict( "damage_noair", false );
int dmgTiming = 1000 * ((damageDef) ? damageDef->GetFloat( "delay", "3.0" ) : 3.0f );
if ( gameLocal.time > lastAirDamage + dmgTiming ) {
Damage( NULL, NULL, vec3_origin, "damage_noair", 1.0f, 0 );
Damage( NULL, NULL, vec3_origin, "damage_noair", 1.0f, 0, idVec3( 0, 0, 0 ) );
lastAirDamage = gameLocal.time;
}
}
Expand Down Expand Up @@ -7766,7 +7766,7 @@ void idPlayer::Kill( bool delayRespawn, bool nodamage ) {
ServerSpectate( true );
forceRespawn = true;
} else {
Damage( this, this, vec3_origin, "damage_suicide", 1.0f, INVALID_JOINT );
Damage( this, this, vec3_origin, "damage_suicide", 1.0f, INVALID_JOINT, idVec3( 0, 0, 0 ) );
if ( delayRespawn ) {
forceRespawn = false;
int delay = spawnArgs.GetFloat( "respawn_delay" );
Expand Down Expand Up @@ -8043,7 +8043,7 @@ inflictor, attacker, dir, and point can be NULL for environmental effects
============
*/
void idPlayer::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir,
const char *damageDefName, const float damageScale, const int location ) {
const char *damageDefName, const float damageScale, const int location, const idVec3 &iPoint ) {
idVec3 kick;
int damage;
int armorSave;
Expand Down Expand Up @@ -9263,7 +9263,7 @@ void idPlayer::Event_ExitTeleporter( void ) {

if ( teleportKiller != -1 ) {
// we got killed while being teleported
Damage( gameLocal.entities[ teleportKiller ], gameLocal.entities[ teleportKiller ], vec3_origin, "damage_telefrag", 1.0f, INVALID_JOINT );
Damage( gameLocal.entities[ teleportKiller ], gameLocal.entities[ teleportKiller ], vec3_origin, "damage_telefrag", 1.0f, INVALID_JOINT, idVec3( 0, 0, 0 ) );
teleportKiller = -1;
} else {
// kill anything that would have waited at teleport exit
Expand Down
2 changes: 1 addition & 1 deletion d3xp/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ class idPlayer : public idActor {
virtual void DamageFeedback( idEntity *victim, idEntity *inflictor, int &damage );
void CalcDamagePoints( idEntity *inflictor, idEntity *attacker, const idDict *damageDef,
const float damageScale, const int location, int *health, int *armor );
virtual void Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location );
virtual void Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location, const idVec3 &iPoint );

// use exitEntityNum to specify a teleport with private camera view and delayed exit
virtual void Teleport( const idVec3 &origin, const idAngles &angles, idEntity *destination );
Expand Down
8 changes: 4 additions & 4 deletions d3xp/Projectile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ bool idProjectile::Collide( const trace_t &collision, const idVec3 &velocity ) {
}

if ( damageDefName[0] != '\0' ) {
ent->Damage( this, owner.GetEntity(), dir, damageDefName, damageScale, CLIPMODEL_ID_TO_JOINT_HANDLE( collision.c.id ) );
ent->Damage( this, owner.GetEntity(), dir, damageDefName, damageScale, CLIPMODEL_ID_TO_JOINT_HANDLE( collision.c.id ), idVec3( collision.c.point ) );
ignore = ent;
}
}
Expand Down Expand Up @@ -1727,7 +1727,7 @@ void idSoulCubeMissile::KillTarget( const idVec3 &dir ) {
if ( ( act->health > 0 ) && ownerEnt && ownerEnt->IsType( idPlayer::Type ) && ( ownerEnt->health > 0 ) && !act->spawnArgs.GetBool( "boss" ) ) {
static_cast<idPlayer *>( ownerEnt )->GiveHealthPool( act->health );
}
act->Damage( this, owner.GetEntity(), dir, spawnArgs.GetString( "def_damage" ), 1.0f, INVALID_JOINT );
act->Damage( this, owner.GetEntity(), dir, spawnArgs.GetString( "def_damage" ), 1.0f, INVALID_JOINT, idVec3( 0, 0, 0 ) );
act->GetAFPhysics()->SetTimeScale( 0.25 );
StartSound( "snd_explode", SND_CHANNEL_BODY, 0, false, NULL );
}
Expand Down Expand Up @@ -2034,7 +2034,7 @@ void idBFGProjectile::Think( void ) {
#endif
org = beamTargets[i].target.GetEntity()->GetPhysics()->GetOrigin() - GetPhysics()->GetOrigin();
org.Normalize();
beamTargets[i].target.GetEntity()->Damage( this, owner.GetEntity(), org, damageFreq, ( damagePower ) ? damagePower : 1.0f, INVALID_JOINT );
beamTargets[i].target.GetEntity()->Damage( this, owner.GetEntity(), org, damageFreq, ( damagePower ) ? damagePower : 1.0f, INVALID_JOINT, idVec3( 0, 0, 0 ) );
} else {
beamTargets[i].renderEntity.shaderParms[ SHADERPARM_RED ] =
beamTargets[i].renderEntity.shaderParms[ SHADERPARM_GREEN ] =
Expand Down Expand Up @@ -2277,7 +2277,7 @@ void idBFGProjectile::Explode( const trace_t &collision, idEntity *ignore ) {
if ( damage[0] && ( beamTargets[i].target.GetEntity()->entityNumber > gameLocal.numClients - 1 ) ) {
dir = beamTargets[i].target.GetEntity()->GetPhysics()->GetOrigin() - GetPhysics()->GetOrigin();
dir.Normalize();
beamTargets[i].target.GetEntity()->Damage( this, ownerEnt, dir, damage, damageScale, ( collision.c.id < 0 ) ? CLIPMODEL_ID_TO_JOINT_HANDLE( collision.c.id ) : INVALID_JOINT );
beamTargets[i].target.GetEntity()->Damage( this, ownerEnt, dir, damage, damageScale, ( collision.c.id < 0 ) ? CLIPMODEL_ID_TO_JOINT_HANDLE( collision.c.id ) : INVALID_JOINT, idVec3( collision.c.point ) );
}
}

Expand Down
2 changes: 1 addition & 1 deletion d3xp/Target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void idTarget_Damage::Event_Activate( idEntity *activator ) {
for( i = 0; i < targets.Num(); i++ ) {
ent = targets[ i ].GetEntity();
if ( ent ) {
ent->Damage( this, this, vec3_origin, damage, 1.0f, INVALID_JOINT );
ent->Damage( this, this, vec3_origin, damage, 1.0f, INVALID_JOINT, idVec3( 0, 0, 0 ) );
}
}
}
Expand Down
Loading