mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-02-23 16:03:35 +00:00
Updated Mine-Disc code
This commit is contained in:
parent
a2a55694b6
commit
91256124bf
2 changed files with 28 additions and 40 deletions
|
|
@ -763,27 +763,21 @@ package DMGame
|
|||
%flash = 0.75;
|
||||
|
||||
// Teratos: Originally from Eolk? Mine+Disc tracking/death message support.
|
||||
// client.mineDisc = [true|false]
|
||||
// client.mineDiscCheck [0-None|1-Disc Damage|2-Mine Damage]
|
||||
// Teratos: Don't understand why "%client = %targetClient;" -- possibly to avoid carrying .minediscCheck field?
|
||||
// Teratos: A little more redundant code and less readable for a few less comparisons.
|
||||
// No Schedules by DarkTiger Ver.2
|
||||
%targetClient.mineDisc = false;
|
||||
if(%damageType == $DamageType::Disc) {
|
||||
%client = %targetClient; // Oops
|
||||
if(%client.minediscCheck == 0) { // No Mine or Disc damage recently
|
||||
%client.minediscCheck = 1;
|
||||
schedule(300, 0, "resetMineDiscCheck", %client);
|
||||
} else if(%client.minediscCheck == 2) { // Recent Mine damage
|
||||
%client.mineDisc = true;
|
||||
}
|
||||
} else if (%damageType == $DamageType::Mine) {
|
||||
%client = %targetClient; // Oops
|
||||
if(%client.minediscCheck == 0) { // No Mine or Disc damage recently
|
||||
%client.minediscCheck = 2;
|
||||
schedule(300, 0, "resetMineDiscCheck", %client);
|
||||
} else if(%client.minediscCheck == 1) { // Recent Disc damage
|
||||
%client.mineDisc = true;
|
||||
}
|
||||
switch$(%damageType)
|
||||
{
|
||||
case $DamageType::Disc:
|
||||
if((getSimTime() - %targetClient.mdcTime1) < 256)
|
||||
%targetClient.mineDisc = true;
|
||||
|
||||
%targetClient.mdcTime2 = getSimTime();
|
||||
|
||||
case $DamageType::Mine:
|
||||
if((getSimTime() - %targetClient.mdcTime2) < 256)
|
||||
%targetClient.mineDisc = true;
|
||||
|
||||
%targetClient.mdcTime1 = getSimTime();
|
||||
}
|
||||
// -- End Mine+Disc insert.
|
||||
|
||||
|
|
|
|||
|
|
@ -365,27 +365,21 @@ package SCtFGame
|
|||
%flash = 0.75;
|
||||
|
||||
// Teratos: Originally from Eolk? Mine+Disc tracking/death message support.
|
||||
// client.mineDisc = [true|false]
|
||||
// client.mineDiscCheck [0-None|1-Disc Damage|2-Mine Damage]
|
||||
// Teratos: Don't understand why "%client = %targetClient;" -- possibly to avoid carrying .minediscCheck field?
|
||||
// Teratos: A little more redundant code and less readable for a few less comparisons.
|
||||
// No Schedules by DarkTiger Ver.2
|
||||
%targetClient.mineDisc = false;
|
||||
if(%damageType == $DamageType::Disc) {
|
||||
%client = %targetClient; // Oops
|
||||
if(%client.minediscCheck == 0) { // No Mine or Disc damage recently
|
||||
%client.minediscCheck = 1;
|
||||
schedule(300, 0, "resetMineDiscCheck", %client);
|
||||
} else if(%client.minediscCheck == 2) { // Recent Mine damage
|
||||
%client.mineDisc = true;
|
||||
}
|
||||
} else if (%damageType == $DamageType::Mine) {
|
||||
%client = %targetClient; // Oops
|
||||
if(%client.minediscCheck == 0) { // No Mine or Disc damage recently
|
||||
%client.minediscCheck = 2;
|
||||
schedule(300, 0, "resetMineDiscCheck", %client);
|
||||
} else if(%client.minediscCheck == 1) { // Recent Disc damage
|
||||
%client.mineDisc = true;
|
||||
}
|
||||
switch$(%damageType)
|
||||
{
|
||||
case $DamageType::Disc:
|
||||
if((getSimTime() - %targetClient.mdcTime1) < 256)
|
||||
%targetClient.mineDisc = true;
|
||||
|
||||
%targetClient.mdcTime2 = getSimTime();
|
||||
|
||||
case $DamageType::Mine:
|
||||
if((getSimTime() - %targetClient.mdcTime2) < 256)
|
||||
%targetClient.mineDisc = true;
|
||||
|
||||
%targetClient.mdcTime1 = getSimTime();
|
||||
}
|
||||
// -- End Mine+Disc insert.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue