mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-14 23:54:32 +00:00
Merge branch 'Dev' into Stable
This commit is contained in:
commit
022c879ab7
4 changed files with 1527 additions and 961 deletions
|
|
@ -479,7 +479,7 @@ addRotationMap("GrassyKnoll", "LCTF",1,1,-1,-1);
|
||||||
addRotationMap("TWL2_MuddySwamp", "LCTF",1,0,8,-1);
|
addRotationMap("TWL2_MuddySwamp", "LCTF",1,0,8,-1);
|
||||||
addRotationMap("SandyRunLT", "LCTF",1,0,-1,12);
|
addRotationMap("SandyRunLT", "LCTF",1,0,-1,12);
|
||||||
addRotationMap("Sentry", "LCTF",1,1,-1,-1);
|
addRotationMap("Sentry", "LCTF",1,1,-1,-1);
|
||||||
addRotationMap("Cinerarium", "LCTF",1,1,-1,-1);
|
addRotationMap("DMP_Cinerarium", "LCTF",1,1,-1,14);
|
||||||
addRotationMap("Exhumed", "LCTF",1,1,-1,-1);
|
addRotationMap("Exhumed", "LCTF",1,1,-1,-1);
|
||||||
addRotationMap("S8_ZilchLT", "LCTF",1,1,-1,-1);
|
addRotationMap("S8_ZilchLT", "LCTF",1,1,-1,-1);
|
||||||
addRotationMap("TWL_BeachBlitzLT", "LCTF",1,0,-1,-1);
|
addRotationMap("TWL_BeachBlitzLT", "LCTF",1,0,-1,-1);
|
||||||
|
|
@ -503,7 +503,7 @@ addRotationMap("HillKingLT", "LCTF",1,1,-1,-1);
|
||||||
addRotationMap("DMP_BastardForgeLT", "LCTF",1,1,-1,-1);
|
addRotationMap("DMP_BastardForgeLT", "LCTF",1,1,-1,-1);
|
||||||
addRotationMap("VanDamnedLT", "LCTF",1,1,-1,-1);
|
addRotationMap("VanDamnedLT", "LCTF",1,1,-1,-1);
|
||||||
addRotationMap("DMP_Paranoia", "LCTF",1,0,-1,-1);
|
addRotationMap("DMP_Paranoia", "LCTF",1,0,-1,-1);
|
||||||
addRotationMap("DMP_Spincycle", "LCTF",1,1,-1,-1);
|
addRotationMap("DMP_SpincycleLT", "LCTF",1,1,-1,-1);
|
||||||
addRotationMap("Ravine", "LCTF",1,1,-1,-1);
|
addRotationMap("Ravine", "LCTF",1,1,-1,-1);
|
||||||
// addRotationMap("DX_Badlands", "LCTF",1,0,-1,-1);
|
// addRotationMap("DX_Badlands", "LCTF",1,0,-1,-1);
|
||||||
// addRotationMap("DX_Desert", "LCTF",1,0,-1,-1);
|
// addRotationMap("DX_Desert", "LCTF",1,0,-1,-1);
|
||||||
|
|
@ -531,7 +531,7 @@ addRotationMap("DermCrossingDeluxeLT", "LCTF",1,1,-1,-1);
|
||||||
addRotationMap("SuperiorWaterworks", "LCTF",1,0,-1,12);
|
addRotationMap("SuperiorWaterworks", "LCTF",1,0,-1,12);
|
||||||
addRotationMap("FrozenForgeLT", "LCTF",1,1,-1,20);
|
addRotationMap("FrozenForgeLT", "LCTF",1,1,-1,20);
|
||||||
addRotationMap("TWL2_CelerityLT", "LCTF",1,1,-1,20);
|
addRotationMap("TWL2_CelerityLT", "LCTF",1,1,-1,20);
|
||||||
addRotationMap("El_Fin", "LCTF",1,1,-1,14);
|
addRotationMap("El_FinLT", "LCTF",1,1,-1,14);
|
||||||
addRotationMap("CapriLT", "LCTF",1,1,-1,14);
|
addRotationMap("CapriLT", "LCTF",1,1,-1,14);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,8 @@ function serverCmd(%client)
|
||||||
//Disable UE box on crash
|
//Disable UE box on crash
|
||||||
//Used if a clean crash is desired
|
//Used if a clean crash is desired
|
||||||
//memPatch("7dc7fc","90");
|
//memPatch("7dc7fc","90");
|
||||||
|
//Loops Crash patch (Prevent the Uncaught Exception dialog from appearing)
|
||||||
|
//memPatch("006ff376", "909090909090");
|
||||||
|
|
||||||
//Show Linux Icon in server list
|
//Show Linux Icon in server list
|
||||||
//memPatch("5C9628","80CB05");
|
//memPatch("5C9628","80CB05");
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
//Fixes for collision tunneling and other issues, note only tested in classic
|
//Fixes for collision tunneling and other issues, note only tested in classic
|
||||||
//Script By:DarkTiger
|
//Script By:DarkTiger
|
||||||
//v3.4 switch over to using SAT/OBB for hitbox detection accuracy, also heavy optimizations becuase of this change
|
//v3.7 - removed bypass code
|
||||||
|
//v3.6 - lctf and SCtFGame
|
||||||
|
//v3.5 - tweaks
|
||||||
|
//v3.4 - switch over to using SAT/OBB for hitbox detection accuracy, also heavy optimizations becuase of this change
|
||||||
//v3.3 - fixed ceiling deadstoping,fixed wall and ceiling tunneling $antiObjTunnel
|
//v3.3 - fixed ceiling deadstoping,fixed wall and ceiling tunneling $antiObjTunnel
|
||||||
//V3.2 - script refactor, removed flag sim in favor of just an offset on toss
|
//V3.2 - script refactor, removed flag sim in favor of just an offset on toss
|
||||||
|
|
||||||
|
|
@ -32,16 +35,8 @@ $flagBoxSize = "0.796666 0.139717 2.46029";
|
||||||
//2 = AABB method but uses boundbox can make the player larger then it is given there direction
|
//2 = AABB method but uses boundbox can make the player larger then it is given there direction
|
||||||
//3 = AABB fixed sizes uses $playerSizeBox and $flagBoxSize to do the box checking
|
//3 = AABB fixed sizes uses $playerSizeBox and $flagBoxSize to do the box checking
|
||||||
$boxCollision = 1;// off is the old AABB method aka the old method
|
$boxCollision = 1;// off is the old AABB method aka the old method
|
||||||
$flagColBypass = 0;//bypass all other collision methods other then this one
|
|
||||||
|
|
||||||
package flagFix{
|
package flagFix{
|
||||||
//because the fade is 2000ms we can compensate the delayed reset not to mess with client timers
|
|
||||||
function Flag::onCollision(%data,%obj,%col){
|
|
||||||
if(!$flagColBypass){
|
|
||||||
parent::onCollision(%data,%obj,%col);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function ShapeBase::throwObject(%this,%obj){
|
function ShapeBase::throwObject(%this,%obj){
|
||||||
parent::throwObject(%this,%obj);
|
parent::throwObject(%this,%obj);
|
||||||
%data = %obj.getDatablock();
|
%data = %obj.getDatablock();
|
||||||
|
|
@ -87,6 +82,15 @@ package flagFix{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function LCTFGame::startMatch(%game){
|
||||||
|
parent::startMatch(%game);
|
||||||
|
if(!isEventPending(Game.flagLoop)){
|
||||||
|
$TeamFlag[1].resetTime = 0;
|
||||||
|
$TeamFlag[2].resetTime = 0;
|
||||||
|
%game.atHomeFlagLoop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function SCtFGame::startMatch(%game){
|
function SCtFGame::startMatch(%game){
|
||||||
parent::startMatch(%game);
|
parent::startMatch(%game);
|
||||||
if(!isEventPending(Game.flagLoop)){
|
if(!isEventPending(Game.flagLoop)){
|
||||||
|
|
@ -117,6 +121,17 @@ package flagFix{
|
||||||
parent::playerTouchFlag(%game, %player, %flag);
|
parent::playerTouchFlag(%game, %player, %flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function LCTFGame::playerTouchFlag(%game, %player, %flag){
|
||||||
|
if(%flag.lastFlagCallms > 0 && $limitFlagCalls){
|
||||||
|
%timeDif = getSimTime() - %flag.lastFlagCallms;
|
||||||
|
if(%timeDif < 32){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%flag.lastFlagCallms = getSimTime();
|
||||||
|
parent::playerTouchFlag(%game, %player, %flag);
|
||||||
|
}
|
||||||
|
|
||||||
function SCtFGame::playerTouchFlag(%game, %player, %flag){
|
function SCtFGame::playerTouchFlag(%game, %player, %flag){
|
||||||
if(%flag.lastFlagCallms > 0 && $limitFlagCalls){
|
if(%flag.lastFlagCallms > 0 && $limitFlagCalls){
|
||||||
%timeDif = getSimTime() - %flag.lastFlagCallms;
|
%timeDif = getSimTime() - %flag.lastFlagCallms;
|
||||||
|
|
@ -145,6 +160,12 @@ package flagFix{
|
||||||
parent::playerDroppedFlag(%game, %player);
|
parent::playerDroppedFlag(%game, %player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function LCTFGame::playerDroppedFlag(%game, %player){
|
||||||
|
%flag = %player.holdingFlag;
|
||||||
|
%flag.lastDropTime = getSimTime();
|
||||||
|
parent::playerDroppedFlag(%game, %player);
|
||||||
|
}
|
||||||
|
|
||||||
function SCtFGame::playerDroppedFlag(%game, %player){
|
function SCtFGame::playerDroppedFlag(%game, %player){
|
||||||
%flag = %player.holdingFlag;
|
%flag = %player.holdingFlag;
|
||||||
%flag.lastDropTime = getSimTime();
|
%flag.lastDropTime = getSimTime();
|
||||||
|
|
@ -170,38 +191,6 @@ package flagFix{
|
||||||
};
|
};
|
||||||
activatePackage(flagFix);
|
activatePackage(flagFix);
|
||||||
|
|
||||||
function FlagCollision(%data,%obj,%col){
|
|
||||||
if($flagColBypass){
|
|
||||||
if (%col.getDataBlock().className $= Armor)
|
|
||||||
{
|
|
||||||
if (%col.isMounted())
|
|
||||||
return;
|
|
||||||
|
|
||||||
// z0dd - ZOD, 6/13/02. Touch the flag and your invincibility and cloaking goes away.
|
|
||||||
if(%col.station $= "" && %col.isCloaked())
|
|
||||||
{
|
|
||||||
if( %col.respawnCloakThread !$= "" )
|
|
||||||
{
|
|
||||||
Cancel(%col.respawnCloakThread);
|
|
||||||
%col.setCloaked( false );
|
|
||||||
%col.respawnCloakThread = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if( %col.client > 0 )
|
|
||||||
{
|
|
||||||
%col.setInvincibleMode(0, 0.00);
|
|
||||||
%col.setInvincible( false );
|
|
||||||
}
|
|
||||||
|
|
||||||
// a player hit the flag
|
|
||||||
Game.playerTouchFlag(%col, %obj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
%data.onCollision(%flag, %player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function vectorMul(%a,%b){
|
function vectorMul(%a,%b){
|
||||||
%x = getWords(%a,0) * getWords(%b,0);
|
%x = getWords(%a,0) * getWords(%b,0);
|
||||||
%y = getWords(%a,1) * getWords(%b,1);
|
%y = getWords(%a,1) * getWords(%b,1);
|
||||||
|
|
@ -247,10 +236,6 @@ function vectorLerp(%point1, %point2, %t) {
|
||||||
|
|
||||||
function boxIntersectAABB(%plr, %flg, %lerpPos){
|
function boxIntersectAABB(%plr, %flg, %lerpPos){
|
||||||
if($boxCollision == 2){
|
if($boxCollision == 2){
|
||||||
%a = %plr.getWorldBox();
|
|
||||||
%b = %flg.getWorldBox();
|
|
||||||
}
|
|
||||||
else if($boxCollision == 3){
|
|
||||||
%fpos = %flg.getPosition();
|
%fpos = %flg.getPosition();
|
||||||
|
|
||||||
%a = vectorAdd($plrBoxMin, %lerpPos) SPC vectorAdd($plrBoxMax, %lerpPos);
|
%a = vectorAdd($plrBoxMin, %lerpPos) SPC vectorAdd($plrBoxMax, %lerpPos);
|
||||||
|
|
@ -290,6 +275,7 @@ function DefaultGame::flagColTest(%game, %flag, %rsTeam, %ext){
|
||||||
InitContainerRadiusSearch( %flagPos, $flagCheckRadius, $TypeMasks::PlayerObjectType);
|
InitContainerRadiusSearch( %flagPos, $flagCheckRadius, $TypeMasks::PlayerObjectType);
|
||||||
while((%player = containerSearchNext()) != 0){
|
while((%player = containerSearchNext()) != 0){
|
||||||
%playerPos = %player.getPosition();
|
%playerPos = %player.getPosition();
|
||||||
|
//%rot = getWords(%player.getTransform(),3,6);
|
||||||
if((%rsTeam && %flag.team != %player.team) || !%rsTeam || %player == %ext){
|
if((%rsTeam && %flag.team != %player.team) || !%rsTeam || %player == %ext){
|
||||||
%flagDist = vectorDist(%flagPos, %playerPos);
|
%flagDist = vectorDist(%flagPos, %playerPos);
|
||||||
if(%player.lastSim > 0 && (%player.getState() !$= "Dead")){// only check at speed
|
if(%player.lastSim > 0 && (%player.getState() !$= "Dead")){// only check at speed
|
||||||
|
|
@ -297,22 +283,20 @@ function DefaultGame::flagColTest(%game, %flag, %rsTeam, %ext){
|
||||||
// %tickDist = vectorLen(%player.getVelocity()) * ($flagSimTime/1000);
|
// %tickDist = vectorLen(%player.getVelocity()) * ($flagSimTime/1000);
|
||||||
%sweepCount = mFloor(vectorDist(%playerPos, %player.oldPos) + 1.5);
|
%sweepCount = mFloor(vectorDist(%playerPos, %player.oldPos) + 1.5);
|
||||||
if((getSimTime() - %player.lastSim) <= 128 && %flagDist-2 < %sweepCount){//make sure are last position is valid
|
if((getSimTime() - %player.lastSim) <= 128 && %flagDist-2 < %sweepCount){//make sure are last position is valid
|
||||||
//error(%player SPC %flagDist SPC %sweepCount);
|
//schedule(1000,0,"drawBeamItem", %player.oldPos,%playerPos,15000);
|
||||||
for(%i = 0; %i < %sweepCount; %i++){// sweep behind us to see if we should have hit something
|
for(%i = 0; %i < %sweepCount; %i++){// sweep behind us to see if we should have hit something
|
||||||
%lerpPos = vectorLerp(%playerPos, %player.oldPos, %i/(%sweepCount-1));//back sweep
|
%lerpPos = vectorLerp(%playerPos, %player.oldPos, %i/(%sweepCount-1));//back sweep
|
||||||
if($boxCollision == 1){
|
//%point = MatrixMulPoint(%lerpPos SPC %rot, "-0.6 -0.6 0");
|
||||||
if(boxIntersect(%player, %flag, %lerpPos)){
|
//schedule(1000+(%i*128), 0, "drawBoxItemC", %point, %rot, "1.2 1.2 2.3", 15000);
|
||||||
//error("flag hit");
|
if($boxCollision == 1 && boxIntersect(%player, %flag, %lerpPos)){
|
||||||
FlagCollision(%flag.getDataBlock(),%flag, %player);
|
// %point = MatrixMulPoint(%flagPos SPC %rot,"-0.398 -0.069 0");
|
||||||
break;
|
// schedule(1000+(%i*128), 0, "drawBoxItemC", %point, %rot, "0.796666 0.139717 4", 15000);
|
||||||
}
|
%flag.getDataBlock().onCollision(%flag, %player);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else{
|
else if($boxCollision > 1 && boxIntersectAABB(%player, %flag, %lerpPos)){
|
||||||
if(boxIntersectAABB(%player, %flag, %lerpPos)){
|
%flag.getDataBlock().onCollision(%flag, %player);
|
||||||
//error("flag hit");
|
break;
|
||||||
FlagCollision(%flag.getDataBlock(),%flag, %player);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -450,19 +434,6 @@ function boxIntersect(%objA, %objB, %scanPos) {
|
||||||
return true; // Overlap on all axes, boxes intersect
|
return true; // Overlap on all axes, boxes intersect
|
||||||
}
|
}
|
||||||
|
|
||||||
function colFlagTest(){
|
|
||||||
%conObj = LocalClientConnection.player; //LocalClientConnection.getControlObject();
|
|
||||||
%flag1 = boxIntersect(%conObj,$TeamFlag[1]);
|
|
||||||
%flag2 = boxIntersect(%conObj,$TeamFlag[2]);
|
|
||||||
|
|
||||||
%flag1AABB = boxIntersectAABB(%conObj, $TeamFlag[1], %conObj.getPosition());
|
|
||||||
%flag2AABB = boxIntersectAABB(%conObj, $TeamFlag[2], %conObj.getPosition());
|
|
||||||
|
|
||||||
error("test" SPC "Flag 1" SPC %flag1 SPC "Flag 2" SPC %flag2);
|
|
||||||
error("test" SPC "Flag 1A" SPC %flag1AABB SPC "Flag 2A" SPC %flag2AABB);
|
|
||||||
bottomprint(%conObj.client, "FlagS" SPC %flag1 SPC "FlagI" SPC %flag2 SPC "FlagS AABB" SPC %flag1AABB SPC "FlagI AABB" SPC %flag2AABB, 5, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
function testFlagSpeed(%speed){
|
function testFlagSpeed(%speed){
|
||||||
%player = LocalClientConnection.player;
|
%player = LocalClientConnection.player;
|
||||||
%fvec = %player.getForwardVector();
|
%fvec = %player.getForwardVector();
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue