Bug Fixes

Some bug fixes from the playtest from earlier.
This commit is contained in:
Robert Fritzen 2017-12-23 14:04:43 -06:00
parent f5160868da
commit 8f2a904135
4 changed files with 18 additions and 25 deletions

View file

@ -113,7 +113,7 @@ function UpdateClientRank(%client) {
%newMillions = %scriptController.millionxp + %millions; %newMillions = %scriptController.millionxp + %millions;
%scriptController.millionxp = %newMillions; %scriptController.millionxp = %newMillions;
%scriptController.xp += %newNonMillions; %scriptController.xp = %newNonMillions;
//End //End
checkForXPAwards(%client); checkForXPAwards(%client);
%j = $Rank::RankCount; %j = $Rank::RankCount;

View file

@ -36,14 +36,14 @@ $Zombie::TypeInfectedMultiplier[1] = 1.5;
//$Zombie::BaseSpeed: The default speed setting on zombies, any zombie that does not have a TypeSpeed var. set will default to the BaseSpeed //$Zombie::BaseSpeed: The default speed setting on zombies, any zombie that does not have a TypeSpeed var. set will default to the BaseSpeed
// Be mindful of the $Zombie::SpeedUpdateTime[#] value when tuning, these two numbers augment closely so you need to be careful on tweaking // Be mindful of the $Zombie::SpeedUpdateTime[#] value when tuning, these two numbers augment closely so you need to be careful on tweaking
$Zombie::BaseSpeed = 150; $Zombie::BaseSpeed = 750;
//$Zombie::TypeSpeed[#]: The speed of a specific zombie type instance, overrides BaseSpeed for that specific type //$Zombie::TypeSpeed[#]: The speed of a specific zombie type instance, overrides BaseSpeed for that specific type
$Zombie::TypeSpeed[2] = 300; $Zombie::TypeSpeed[2] = 1500;
$Zombie::TypeSpeed[3] = 4000; $Zombie::TypeSpeed[3] = 4000;
$Zombie::TypeSpeed[4] = 240; $Zombie::TypeSpeed[4] = 1200;
$Zombie::TypeSpeed[5] = 1500; $Zombie::TypeSpeed[5] = 1500;
$Zombie::TypeSpeed[6] = 1200; $Zombie::TypeSpeed[6] = 1200;
$Zombie::TypeSpeed[11] = 240; $Zombie::TypeSpeed[11] = 1200;
//$Zombie::BaseJumpCooldown: The time zombies must elapse before jumping / lunging //$Zombie::BaseJumpCooldown: The time zombies must elapse before jumping / lunging
$Zombie::BaseJumpCooldown = 1500; $Zombie::BaseJumpCooldown = 1500;
@ -53,13 +53,6 @@ $Zombie::SpeedMultiplier[2] = 0.6;
$Zombie::SpeedMultiplier[3] = 0.8; $Zombie::SpeedMultiplier[3] = 0.8;
$Zombie::SpeedMultiplier[4] = 0.75; $Zombie::SpeedMultiplier[4] = 0.75;
//$Zombie::BaseSpeedUpdateTime: How long (in ms) between each zombie update. The lower the number, the smoother the movement, but the more processing needed
$Zombie::BaseSpeedUpdateTime = 100;
//$Zombie::SpeedUpdateTime[#]: An override to the base update type, use for specific types that need slower or faster processing between AI steps
$Zombie::SpeedUpdateTime[3] = 500;
$Zombie::SpeedUpdateTime[5] = 500;
$Zombie::SpeedUpdateTime[6] = 500;
//$Zombie::LungeDistance: How far (m) a zombie must be to lunge at a target //$Zombie::LungeDistance: How far (m) a zombie must be to lunge at a target
$Zombie::LungeDistance = 10; $Zombie::LungeDistance = 10;
@ -410,7 +403,7 @@ function TWM2Lib_Zombie_Core(%functionName, %arg1, %arg2, %arg3, %arg4) {
return; return;
} }
// //
if(!isSet(%arg2)) { if(%arg2 $= "") {
%tPos = TWM2Lib_MainControl("RMPG"); %tPos = TWM2Lib_MainControl("RMPG");
} }
else { else {
@ -418,8 +411,8 @@ function TWM2Lib_Zombie_Core(%functionName, %arg1, %arg2, %arg3, %arg4) {
} }
// //
%vec = vectorNormalize(vectorSub(%tPos, %arg1.getWorldBoxCenter())); %vec = vectorNormalize(vectorSub(%tPos, %arg1.getWorldBoxCenter()));
%vx = getWord(%vector, 0); %vx = getWord(%vec, 0);
%vy = getWord(%vector, 1); %vy = getWord(%vec, 1);
%nvx = %vy; %nvx = %vy;
%nvy = (%vx * -1); %nvy = (%vx * -1);
%lookVector = %nvx @ " " @ %nvy @ " " @ 0; %lookVector = %nvx @ " " @ %nvy @ " " @ 0;
@ -693,10 +686,10 @@ function TWM2Lib_Zombie_Core(%functionName, %arg1, %arg2, %arg3, %arg4) {
} }
//Define Speed Parameters //Define Speed Parameters
%zombie.speed = TWM2Lib_Zombie_Core("defineZSpeed", %spawnType); %zombie.speed = TWM2Lib_Zombie_Core("defineZSpeed", %spawnType);
if(!isSet($Zombie::SpeedUpdateTime[%spawnType])) { //if(!isSet($Zombie::SpeedUpdateTime[%spawnType])) {
%zombie.updateTimeFrequency = $Zombie::BaseSpeedUpdateTime; // %zombie.updateTimeFrequency = $Zombie::BaseSpeedUpdateTime;
} //}
%zombie.updateTimeFrequency = $Zombie::SpeedUpdateTime[%spawnType]; //%zombie.updateTimeFrequency = $Zombie::SpeedUpdateTime[%spawnType];
//Define Damage Parameters //Define Damage Parameters
if(!isSet($Zombie::InfectOnCollide[%spawnType])) { if(!isSet($Zombie::InfectOnCollide[%spawnType])) {
%zombie.damage_infectOnTouch = true; %zombie.damage_infectOnTouch = true;

View file

@ -111,7 +111,7 @@ function ZombieArmor::Move(%datablock, %zombie) {
} }
else if(%zombie.hastarget == 1) { else if(%zombie.hastarget == 1) {
%zombie.hastarget = 0; %zombie.hastarget = 0;
%zombie.zombieRmove = schedule(%zombie.updateTimeFrequency, %zombie, "TWM2Lib_Zombie_Core", "zRandomMoveLoop", %zombie); %zombie.zombieRmove = schedule(500, %zombie, "TWM2Lib_Zombie_Core", "zRandomMoveLoop", %zombie);
} }
%zombie.moveloop = %datablock.schedule(%zombie.updateTimeFrequency, "Move", %zombie); %zombie.moveloop = %datablock.schedule(500, "Move", %zombie);
} }

View file

@ -706,13 +706,13 @@ function InventoryScreen::updateHud( %this, %client, %tag ) {
} }
if ( !($InvBanList[%cmt, %WInv]) ) { if ( !($InvBanList[%cmt, %WInv]) ) {
if ( %notFound && %weaponList $= "" ) { if ( %notFound && %weaponList $= "" ) {
%useCode = CanUseWeapon(%client, %WInv.Image); %useCode = CanUseWeapon(%WInv.Image, %client);
if(%useCode == 1) { if(%useCode == 1) {
%weaponList = $InvWeapon[%y]; %weaponList = $InvWeapon[%y];
} }
} }
else if ( %notFound ) { else if ( %notFound ) {
%useCode = CanUseWeapon(%client, %WInv.Image); %useCode = CanUseWeapon(%WInv.Image, %client);
if(%useCode == 1) { if(%useCode == 1) {
%weaponList = %weaponList TAB $InvWeapon[%y]; %weaponList = %weaponList TAB $InvWeapon[%y];
} }
@ -732,7 +732,7 @@ function InventoryScreen::updateHud( %this, %client, %tag ) {
for ( %y = 0; $InvPistol[%y] !$= ""; %y++ ) { for ( %y = 0; $InvPistol[%y] !$= ""; %y++ ) {
%PistolInv = $NameToInv[$InvPistol[%y]]; %PistolInv = $NameToInv[$InvPistol[%y]];
if ( ( $InvPistol[%y] !$= %client.favorites[getField( %client.pistolIndex, 0 )]) && !($InvBanList[%cmt, %PistolInv])) { if ( ( $InvPistol[%y] !$= %client.favorites[getField( %client.pistolIndex, 0 )]) && !($InvBanList[%cmt, %PistolInv])) {
%useCode = CanUseWeapon(%client, %PistolInv.Image); %useCode = CanUseWeapon(%PistolInv.Image, %client);
if(%useCode == 1) { if(%useCode == 1) {
%pistolList = %pistolList TAB $InvPistol[%y]; %pistolList = %pistolList TAB $InvPistol[%y];
} }
@ -751,7 +751,7 @@ function InventoryScreen::updateHud( %this, %client, %tag ) {
for ( %y = 0; $InvMelee[%y] !$= ""; %y++ ) { for ( %y = 0; $InvMelee[%y] !$= ""; %y++ ) {
%meleeInv = $NameToInv[$InvMelee[%y]]; %meleeInv = $NameToInv[$InvMelee[%y]];
if ( ( $InvMelee[%y] !$= %client.favorites[getField( %client.meleeIndex, 0 )]) && %armor.max[%meleeInv] && !($InvBanList[%cmt, %meleeInv])) { if ( ( $InvMelee[%y] !$= %client.favorites[getField( %client.meleeIndex, 0 )]) && %armor.max[%meleeInv] && !($InvBanList[%cmt, %meleeInv])) {
%useCode = CanUseWeapon(%client, %meleeInv.Image); %useCode = CanUseWeapon(%meleeInv.Image, %client);
if(%useCode == 1) { if(%useCode == 1) {
%meleeList = %meleeList TAB $InvMelee[%y]; %meleeList = %meleeList TAB $InvMelee[%y];
} }