mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-01-20 00:24:49 +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
|
|
@ -3,6 +3,9 @@
|
|||
// Various Overrides
|
||||
//
|
||||
|
||||
// Global water viscosity
|
||||
$globalviscosity = 3;
|
||||
|
||||
package TacoOverrides
|
||||
{
|
||||
|
||||
|
|
@ -158,6 +161,33 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue