Merge branch 'Dev' into Stable

This commit is contained in:
ChocoTaco1 2022-10-01 22:50:45 -04:00
commit d2fdee2287
5 changed files with 127 additions and 3582 deletions

View file

@ -17,6 +17,9 @@
// Thanks for helping me test!
// maradona, pip, phantom jaguar, hilikus, the_ham, pip, wiggle, dragon, pancho villa, w/o, nectar and many others..
//
// v3.40 Sept 2022
// Nerfed Shocklance height bonus and Flag catching height
//
// v3.39 Aug 2021
// Added Leave Mission Area Damage from Arena
//
@ -575,7 +578,7 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
%height = getHeight(%sourceObject);
%heightBonus = (mPow(%height,1.20)/14)+1; //was 10
%velBonus /= 2;
%points = mFloor(%distance/2) + (%heightBonus);
%points = mFloor(%distance/2) + (%heightBonus/3); //Added /3 for height
%accuracy = " [Height:" @ %height @"m]";
// borlak -- check rear shocklance hit
@ -1921,11 +1924,11 @@ function LakRabbitGame::playerTouchFlag(%game, %player, %flag)
// borlak -- points for MA flag grabs
%mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType;
%rayStart = %player.getWorldBoxCenter();
%rayEnd = getWord(%rayStart, 0) SPC getWord(%rayStart, 1) SPC getWord(%rayStart, 2) - 5;
%rayEnd = getWord(%rayStart, 0) SPC getWord(%rayStart, 1) SPC getWord(%rayStart, 2) - 20;
%ground = ContainerRayCast(%rayStart, %rayEnd, %mask, 0);
if(!%ground)
{
%points = mFloor((getSpeed(%player)/7.3) + (getHeight(%player)/3.3)); //was 5.3 - 2.3
%points = mFloor((getSpeed(%player)/8.3) + (getHeight(%player)/2.3)); //was 5.3 - 2.3
%points = %points > 5 ? %points : 5;
messageAll('MsgRabbitFlagTaken', '\c4%1 gets %2 points for a Mid-Air flag grab! [Speed:%3] [Height:%4]~wfx/misc/hunters_horde.wav', %player.client.name, %points, getSpeed(%player), getHeight(%player));
%player.client.morepoints += %points;

View file

@ -57,4 +57,4 @@ function serverCmd(%client)
//memPatch("5C9628","80CB05");
//Bahke MPB stability fix
memPatch("614120","9090");
//memPatch("614120","9090");

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@
//exec("scripts/autoexec/zzDiscordBot.cs");
//ip of the bot
$discordBot::IP = "127.0.0.1:28003";
$discordBot::IP = "";
$discordBot::reconnectTimeout = 3 * 60000;
//auto connect on start
$discordBot::autoStart = 0;
@ -135,6 +135,36 @@ function LogMessage(%client, %msg, %cat){
parent::LogMessage(%client, %msg, %cat);
}
function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch ){
parent::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch );
if(%client.getAddress() !$= "Local" && discord.lastState $= "Connected"){
%ip = %client.getAddress();
%ip = getSubStr(%ip, 3, strLen(%ip));
%ip = getSubStr(%ip, 0, strstr(%ip, ":"));
%authInfo = %client.getAuthInfo();
%guid = getField( %authInfo, 3 );
%realName = getField( %authInfo, 0 );
%name = (%realName !$= "") ? %realName : stripChars( detag( getTaggedString( %client.name ) ), "\cp\co\c6\c7\c8\c9\c0");
discord.send("CONDATA" @ $discordBot::cmdSplit @ %name @ $discordBot::cmdSplit @ %ip @ $discordBot::cmdSplit @ %guid @ "\r\n");
}
}
function GameConnection::onDrop(%client, %reason){
if(%client.getAddress() !$= "Local" && discord.lastState $= "Connected"){
%ip = %client.getAddress();
%ip = getSubStr(%ip, 3, strLen(%ip));
%ip = getSubStr(%ip, 0, strstr(%ip, ":"));
%authInfo = %client.getAuthInfo();
%guid = getField( %authInfo, 3 );
%realName = getField( %authInfo, 0 );
%name = (%realName !$= "") ? %realName : stripChars( detag( getTaggedString( %client.name ) ), "\cp\co\c6\c7\c8\c9\c0");
discord.send("DROPDATA" @ $discordBot::cmdSplit @ %name @ $discordBot::cmdSplit @ %ip @ $discordBot::cmdSplit @ %guid @ "\r\n");
}
parent::onDrop(%client, %reason);
}
};
if(!isActivePackage(discordPackage))

View file

@ -118,39 +118,42 @@ function Observer::onTrigger(%data,%obj,%trigger,%state)
// Free-flying observer camera
if (%trigger == 0)
{
if( !$Host::TournamentMode && $MatchStarted )
if(!%client.waitRespawn && getSimTime() > %client.suicideRespawnTime)
{
// reset observer params
clearBottomPrint(%client);
commandToClient(%client, 'setHudMode', 'Standard');
if( !$Host::TournamentMode && $MatchStarted )
{
// reset observer params
clearBottomPrint(%client);
commandToClient(%client, 'setHudMode', 'Standard');
if( %client.lastTeam !$= "" && %client.lastTeam != 0 && Game.numTeams > 1)
{
Game.clientJoinTeam( %client, %client.lastTeam, $MatchStarted );
%client.camera.setFlyMode();
%client.setControlObject( %client.player );
if( %client.lastTeam !$= "" && %client.lastTeam != 0 && Game.numTeams > 1)
{
Game.clientJoinTeam( %client, %client.lastTeam, $MatchStarted );
%client.camera.setFlyMode();
%client.setControlObject( %client.player );
}
else
{
Game.assignClientTeam( %client );
// Spawn the player:
Game.spawnPlayer( %client, true );
%client.camera.setFlyMode();
%client.setControlObject( %client.player );
ClearBottomPrint( %client );
}
}
else
else if( !$Host::TournamentMode )
{
clearBottomPrint(%client);
Game.assignClientTeam( %client );
// Spawn the player:
Game.spawnPlayer( %client, true );
%client.camera.setFlyMode();
%client.setControlObject( %client.player );
ClearBottomPrint( %client );
Game.spawnPlayer( %client, false );
%client.camera.getDataBlock().setMode( %client.camera, "pre-game", %client.player );
%client.setControlObject( %client.camera );
}
}
else if( !$Host::TournamentMode )
{
clearBottomPrint(%client);
Game.assignClientTeam( %client );
// Spawn the player:
Game.spawnPlayer( %client, false );
%client.camera.getDataBlock().setMode( %client.camera, "pre-game", %client.player );
%client.setControlObject( %client.camera );
}
}
else if (%trigger == 3) //press JET
{