Skip to content

Commit

Permalink
Added NOREJOIN tag for corpses
Browse files Browse the repository at this point in the history
If the NOREJOIN tag is one, the player cannot come back to life on that corpse. That is, the player comes back to life but not on the corpse.
	This tag does not prevent the player from coming back to life, it just prevents them from respawning on that corpse. The player always comes back to life, but not on that corpse.
  • Loading branch information
canerksk committed Oct 25, 2024
1 parent f051889 commit 670a6c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3914,3 +3914,7 @@ Added: 'H' shortcut for variables to get the value as hexadecimal.

13-10-2024, Jhobean
- Added: @PetRelease trigger work like @petdesert and return 1 to prevent the pet from being released.

25-10-2024, canerksk
- Added: Added NOREJOIN tag for corpses, If the NOREJOIN tag is one, the player cannot come back to life on that corpse. That is, the player comes back to life but not on the corpse.
This tag does not prevent the player from coming back to life, it just prevents them from respawning on that corpse. The player always comes back to life, but not on that corpse.
2 changes: 2 additions & 0 deletions src/game/items/CItemCorpse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ CItemCorpse *CChar::FindMyCorpse( bool ignoreLOS, int iRadius ) const
break;
if ( !pItem->IsType(IT_CORPSE) )
continue;
if (pItem->m_TagDefs.GetKeyNum("NOREJOIN")) // OWNERS OF THE BODIES WITH THIS TAG SHOULD NOT STAND ON THE BODIES
continue;
CItemCorpse *pCorpse = dynamic_cast<CItemCorpse*>(pItem);
if ( !pCorpse || (pCorpse->m_uidLink != GetUID()) )
continue;
Expand Down

0 comments on commit 670a6c3

Please sign in to comment.