mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-15 16:14:35 +00:00
Global Water Viscosity and Console Spam fix
Added Global Water Viscosity Console Spam Fix
This commit is contained in:
parent
16fff596b2
commit
7ad8457783
1 changed files with 30 additions and 0 deletions
|
|
@ -3,6 +3,9 @@
|
||||||
// Various Overrides
|
// Various Overrides
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// Global water viscosity
|
||||||
|
$globalviscosity = 3;
|
||||||
|
|
||||||
package TacoOverrides
|
package TacoOverrides
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -158,6 +161,33 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
|
||||||
Parent::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %mineSC);
|
Parent::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %mineSC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Item 'Use' Console spam fix
|
||||||
|
function serverCmdUse(%client,%data)
|
||||||
|
{
|
||||||
|
// Item names from the client must converted
|
||||||
|
// into DataBlocks
|
||||||
|
// %data = ItemDataBlock[%item];
|
||||||
|
//if(isObject(%client.player)) // z0dd - ZOD, 5/18/03. Console spam fix
|
||||||
|
//%client.player.use(%data);
|
||||||
|
|
||||||
|
//Spam Fix 7/2020
|
||||||
|
if(isObject(%client.player) && isObject(%client.getControlObject()))
|
||||||
|
%client.getControlObject().use(%data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Global water viscosity
|
||||||
|
function DefaultGame::missionLoadDone(%game)
|
||||||
|
{
|
||||||
|
parent::missionLoadDone(%game);
|
||||||
|
|
||||||
|
for(%i = 0; %i < MissionGroup.getCount(); %i++)
|
||||||
|
{
|
||||||
|
%obj = MissionGroup.getObject(%i);
|
||||||
|
if(%obj.getClassName() $= "WaterBlock")
|
||||||
|
%obj.viscosity = $globalviscosity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Prevent package from being activated if it is already
|
// Prevent package from being activated if it is already
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue