Commited some minor stuff, unimportant
This commit is contained in:
parent
6678a562ae
commit
e7f1db0543
6 changed files with 162 additions and 23 deletions
|
@ -329,4 +329,6 @@ void CBot::Create( int iBotID )
|
|||
|
||||
ClientConnect();
|
||||
PutClientInServer();
|
||||
|
||||
customphysics = Empty;
|
||||
}
|
||||
|
|
|
@ -272,7 +272,7 @@ void SV_AddDebugPolygons( void ) {
|
|||
return;
|
||||
}
|
||||
|
||||
int nearest = Way_FindClosestWaypoint( self.origin );
|
||||
int nearest = Way_FindClosestWaypoint(self.origin);
|
||||
makevectors(self.v_angle);
|
||||
R_BeginPolygon( "waypoint", 0, 0 );
|
||||
|
||||
|
|
|
@ -105,6 +105,8 @@ void Damage_Apply( entity eTarget, entity eAttacker, int iDamage, vector vHitPos
|
|||
return;
|
||||
}
|
||||
|
||||
eTarget.velocity = [0,0,0];
|
||||
|
||||
// Apply the damage finally
|
||||
if ( eTarget.armor ) {
|
||||
float fRatio = 0.5;
|
||||
|
|
131
Source/Server/DefsFields.h
Normal file
131
Source/Server/DefsFields.h
Normal file
|
@ -0,0 +1,131 @@
|
|||
/*
|
||||
Copyright 2016-2018 Marco "eukara" Hladik
|
||||
|
||||
MIT LICENSE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// GoldSrc-Rendermode Fields
|
||||
.vector rendercolor;
|
||||
.float rendermode;
|
||||
.float renderamt;
|
||||
.float alpha;
|
||||
|
||||
// All about +use
|
||||
.void(void) vUse;
|
||||
.int iUsable;
|
||||
|
||||
// Generic entity fields
|
||||
.void() PlayerUse;
|
||||
.int iBleeds;
|
||||
.void(int iHitBody) vPain;
|
||||
.void(int iHitBody) vDeath;
|
||||
.float fRespawns;
|
||||
.entity eUser;
|
||||
.float material;
|
||||
|
||||
/* Respawnable/reset entity fields */
|
||||
.string sOldModel;
|
||||
.float fOldSolid;
|
||||
.float fOldHealth;
|
||||
.vector vOldOrigin;
|
||||
.vector vOldAngle;
|
||||
.void() vRespawn;
|
||||
.void() vOldUse;
|
||||
|
||||
// Player specific fields
|
||||
.float fInBuyZone;
|
||||
.float fInHostageZone;
|
||||
.float fInBombZone;
|
||||
.float fMoney;
|
||||
.float fStepTime;
|
||||
.int iInGame;
|
||||
.float fCharModel;
|
||||
.float fDeaths;
|
||||
.int iEquipment;
|
||||
.float armor;
|
||||
.float fProgressBar;
|
||||
|
||||
// Weapon specific fields
|
||||
.int iCurrentMag;
|
||||
.int iCurrentCaliber;
|
||||
.float fSlotMelee;
|
||||
.float fSlotPrimary;
|
||||
.float fSlotSecondary;
|
||||
.float fSlotGrenade;
|
||||
.float fAttackFinished;
|
||||
.float fRadioFinished;
|
||||
.float fAccuracy;
|
||||
|
||||
/* Map Entity Specific Fields /*
|
||||
* They used to be in their respective files, but there is not much point */
|
||||
|
||||
/* ambient_generic */
|
||||
.float pitch;
|
||||
.float loop;
|
||||
.float lforate;
|
||||
|
||||
/* armoury_entity */
|
||||
.float item;
|
||||
.float count;
|
||||
|
||||
/* hostage_entity */
|
||||
.entity eTargetPoint;
|
||||
.entity eLastCreated;
|
||||
.int iHasBeenUsed;
|
||||
|
||||
/* env_sprite */
|
||||
.float framerate;
|
||||
|
||||
/* env_explosion */
|
||||
.int iMagnitude;
|
||||
|
||||
/* env_spark */
|
||||
.float MaxDelay;
|
||||
|
||||
/* func_button || func_door */
|
||||
.float speed;
|
||||
.float lip;
|
||||
.float dmg;
|
||||
.float state;
|
||||
.vector pos1;
|
||||
.vector pos2;
|
||||
.float movesnd;
|
||||
.float stopsnd;
|
||||
|
||||
/* func_door_rotating */
|
||||
.float distance;
|
||||
|
||||
/* func_vehicle */
|
||||
.entity eDriver;
|
||||
.entity eVehicle;
|
||||
.float height;
|
||||
|
||||
/* infodecal */
|
||||
.string texture;
|
||||
|
||||
/* light */
|
||||
.string pattern;
|
||||
|
||||
/* info_map_parameters */
|
||||
.float buying;
|
||||
.float bombradius;
|
|
@ -20,7 +20,7 @@ var float PHY_JUMP_CHAINDECAY = 50;
|
|||
.float waterlevel;
|
||||
.float watertype;
|
||||
.float teleport_time;
|
||||
//int trace_endcontentsi;
|
||||
int trace_endcontentsi;
|
||||
.float maxspeed;
|
||||
.vector view_ofs;
|
||||
|
||||
|
@ -73,22 +73,23 @@ void PMove_Categorize(void)
|
|||
}
|
||||
}
|
||||
|
||||
// Check water levels, boo
|
||||
contents = pointcontents(self.origin + self.mins + '0 0 1');
|
||||
|
||||
//print(sprintf("Contents: %d\n", contents));
|
||||
|
||||
// Ladder content testing
|
||||
/*// Check water levels, boo */
|
||||
int oldhitcontents = self.hitcontentsmaski;
|
||||
self.hitcontentsmaski = CONTENTBIT_FTELADDER;
|
||||
tracebox(self.origin, self.mins, self.maxs, self.origin, FALSE, self);
|
||||
self.hitcontentsmaski = CONTENTBIT_LAVA | CONTENTBIT_SLIME | CONTENTBIT_WATER;
|
||||
tracebox( self.origin, self.mins, self.maxs, self.origin, FALSE, self );
|
||||
self.hitcontentsmaski = oldhitcontents;
|
||||
|
||||
print(sprintf( "Contents: %i\n", trace_endcontentsi));
|
||||
|
||||
/*if (trace_endcontentsi & CONTENTBIT_FTELADDER || iContents == CONTENT_LADDER) {
|
||||
self.flags |= FL_ONLADDER;
|
||||
if (trace_endcontentsi & CONTENTBIT_WATER) {
|
||||
contents = CONTENT_WATER;
|
||||
} else if (trace_endcontentsi & CONTENTBIT_SLIME) {
|
||||
contents = CONTENT_SLIME;
|
||||
} else if (trace_endcontentsi & CONTENTBIT_LAVA) {
|
||||
contents = CONTENT_LAVA;
|
||||
} else {
|
||||
self.flags &= ~FL_ONLADDER;
|
||||
}*/
|
||||
contents = CONTENT_EMPTY;
|
||||
}
|
||||
|
||||
if (contents < CONTENT_SOLID && contents != CONTENT_LADDER) {
|
||||
self.watertype = contents;
|
||||
|
@ -630,21 +631,19 @@ void PMove_Run_Move(void)
|
|||
}
|
||||
}
|
||||
|
||||
if ((self.flags & FL_ONGROUND) && !(self.velocity[2] > 0)) {
|
||||
/* try to step down, only if there's something down there */
|
||||
/* touch whatever is below */
|
||||
if (self.flags & FL_ONGROUND) {
|
||||
vecDestPos = self.origin;
|
||||
vecDestPos[2] -= serverkeyfloat("phy_stepheight");
|
||||
tracebox(self.origin, self.mins, self.maxs, vecDestPos, FALSE, self); //try going straight there
|
||||
tracebox(self.origin, self.mins, self.maxs, vecDestPos, FALSE, self);
|
||||
if (trace_fraction >= 1) {
|
||||
return;
|
||||
}
|
||||
if (trace_startsolid) {
|
||||
/*if (trace_startsolid) {
|
||||
if (!PMove_Fix_Origin()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
self.origin = trace_endpos;
|
||||
|
||||
}*/
|
||||
PMove_DoTouch(trace_ent);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@ class func_breakable : CBaseTrigger
|
|||
int m_pressType;
|
||||
int m_pressDamage;*/
|
||||
|
||||
void() func_breakable;
|
||||
virtual void() Respawn;
|
||||
virtual void() Trigger;
|
||||
virtual void() PlayerTouch;
|
||||
/*virtual void() PressureDeath;*/
|
||||
|
@ -112,6 +114,7 @@ void func_breakable :: PlayerTouch ( void )
|
|||
}
|
||||
|
||||
if ((spawnflags & SF_PRESSURE) && (other.absmin_z >= maxs_z - 2)) {
|
||||
touch = __NULL__;
|
||||
think = Trigger;
|
||||
|
||||
if (m_flDelay == 0) {
|
||||
|
@ -125,7 +128,11 @@ void func_breakable :: PlayerTouch ( void )
|
|||
|
||||
void func_breakable :: Respawn ( void )
|
||||
{
|
||||
setorigin(this, m_oldOrigin);
|
||||
setmodel(this, m_oldModel);
|
||||
touch = PlayerTouch;
|
||||
think = __NULL__;
|
||||
|
||||
if ( spawnflags & SF_TRIGGER ) {
|
||||
takedamage = DAMAGE_NO;
|
||||
} else {
|
||||
|
@ -161,6 +168,4 @@ void func_breakable :: func_breakable( void )
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue