forked from necropotame/teeworlds-infclass
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
voodoos full armor doubles voodoos spirit time
- Loading branch information
Showing
1 changed file
with
19 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -958,6 +958,13 @@ void CCharacter::FireWeapon() | |
|
||
pTarget->m_EmoteType = EMOTE_HAPPY; | ||
pTarget->m_EmoteStop = Server()->Tick() + Server()->TickSpeed(); | ||
|
||
if(pTarget->GetClass() == PLAYERCLASS_VOODOO) | ||
{ | ||
int alivefactor = m_Armor * 2; | ||
pTarget->m_VoodooTimeAlive = (Server()->TickSpeed()*g_Config.m_InfVoodooAliveTime * alivefactor) / 10; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
teoman002
Author
Collaborator
|
||
} | ||
|
||
} | ||
|
||
if(!pTarget->GetPlayer()->HookProtectionEnabled()) | ||
|
@@ -1675,16 +1682,19 @@ void CCharacter::Tick() | |
//~ } | ||
//~ else | ||
//~ m_InWater = 0; | ||
// Delayed Death | ||
if(GetClass() == PLAYERCLASS_VOODOO && m_VoodooAboutToDie && m_VoodooTimeAlive > 0) | ||
{ | ||
m_VoodooTimeAlive-=1000; | ||
} | ||
else if(GetClass() == PLAYERCLASS_VOODOO && m_VoodooAboutToDie && m_VoodooTimeAlive <= 0) | ||
{ | ||
Die(m_VoodooKiller, m_VoodooWeapon); | ||
|
||
if(GetClass() == PLAYERCLASS_VOODOO) | ||
{ | ||
// Delayed Death | ||
if(m_VoodooAboutToDie) | ||
{ | ||
m_VoodooTimeAlive-=1000; | ||
|
||
if(m_VoodooTimeAlive <= 0) | ||
Die(m_VoodooKiller, m_VoodooWeapon); | ||
} | ||
} | ||
|
||
// Display time left to live | ||
if(GetClass() == PLAYERCLASS_VOODOO && m_VoodooAboutToDie) | ||
{ | ||
|
1 comment
on commit e5b2e3e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
closed #137
This is super weird.
Why do we use
m_Armor
?m_Armor
is the armor of the healing zombie, not armor of the zombie being healed.Assuming we fix the bug mentioned above, why do we set voodoo alivetime like this? Suppose the following happens:
Or the following:
The idea proposed by me in the bugreport was very raw. It should have been thought through and various scenarios should have been discussed.