darkplaces-glx
darkplaces-sdl
darkplaces-dedicated
+doombringer-lx
+doombringer-lx-ded
gmon.out
*.ncb
*.opt
DP_LINK_ODE=dlopen
DP_LINK_ZLIB=dlopen'
maketargets='release'
- outputs='darkplaces-sdl.exe:darkplaces-x86.exe darkplaces-dedicated.exe:darkplaces-x86-dedicated.exe'
+ outputs='doombringer.exe:darkplaces-x86.exe darkplaces-dedicated.exe:darkplaces-x86-dedicated.exe'
;;
win64)
chroot=
DP_LINK_ODE=dlopen
DP_LINK_ZLIB=dlopen'
maketargets='release'
- outputs='darkplaces-sdl.exe:darkplaces.exe darkplaces-dedicated.exe:darkplaces-dedicated.exe'
+ outputs='doombringer.exe:darkplaces.exe darkplaces-dedicated.exe:darkplaces-dedicated.exe'
;;
osx)
chroot=
traceowner = passedict ? PRVM_PROG_TO_EDICT(PRVM_clientedictedict(passedict, owner)) : NULL;
clipgroup = passedict ? (int)PRVM_clientedictfloat(passedict, clipgroup) : 0;
-
// collide against network entities
if (hitnetworkbrushmodels)
{
for (i = 0;i < cl.num_brushmodel_entities;i++)
{
+ entity_state_t *ent_fields = &cl.entities[cl.brushmodel_entities[i]].state_current;
+ if (ent_fields->solid == SOLID_NOT)
+ continue;
+
entity_render_t *ent = &cl.entities[cl.brushmodel_entities[i]].render;
if (!BoxesOverlap(clipboxmins, clipboxmaxs, ent->mins, ent->maxs))
continue;
*hitnetworkentity = cl.brushmodel_entities[i];
Collision_CombineTraces(&cliptrace, &trace, NULL, true);
}
+
+
+
+
+ vec3_t origin, entmins, entmaxs;
+ matrix4x4_t entmatrix, entinversematrix;
+
+ for (i = cl.maxclients;i < cl.num_entities;i++)
+ {
+ entity_render_t *ent = &cl.entities[i].render;
+ entity_state_t *ent_fields = &cl.entities[i].state_current;
+
+ // don't hit players that don't exist
+ if (!cl.entities_active[i])
+ continue;
+ if (ent_fields->solid == SOLID_NOT || ent_fields->solid == SOLID_NOTNETWORKED)
+ continue;
+
+ Matrix4x4_OriginFromMatrix(&ent->matrix, origin);
+ VectorAdd(origin, ent_fields->mins, entmins);
+ VectorAdd(origin, ent_fields->maxs, entmaxs);
+ if (!BoxesOverlap(clipboxmins, clipboxmaxs, entmins, entmaxs))
+ continue;
+ Matrix4x4_CreateTranslate(&entmatrix, origin[0], origin[1], origin[2]);
+ Matrix4x4_CreateTranslate(&entinversematrix, -origin[0], -origin[1], -origin[2]);
+ Collision_ClipPointToGenericEntity(&trace, NULL, NULL, NULL, ent_fields->mins, ent_fields->maxs, SUPERCONTENTS_BODY, &entmatrix, &entinversematrix, start, hitsupercontentsmask, skipsupercontentsmask, skipmaterialflagsmask);
+ if (cliptrace.fraction > trace.fraction && hitnetworkentity)
+ *hitnetworkentity = i;
+ Collision_CombineTraces(&cliptrace, &trace, NULL, false);
+ }
}
// collide against player entities
for (i = 1;i <= cl.maxclients;i++)
{
entity_render_t *ent = &cl.entities[i].render;
-
+ entity_state_t *ent_fields = &cl.entities[i].state_current;
+
// don't hit ourselves
if (i == cl.playerentity)
continue;
-
+
// don't hit players that don't exist
if (!cl.entities_active[i])
continue;
+ if (ent_fields->solid == SOLID_NOT)
+ continue;
if (!cl.scores[i-1].name[0])
continue;
{
for (i = 0;i < cl.num_brushmodel_entities;i++)
{
+ entity_state_t *ent_fields = &cl.entities[cl.brushmodel_entities[i]].state_current;
+ if (ent_fields->solid == SOLID_NOT)
+ continue;
+
entity_render_t *ent = &cl.entities[cl.brushmodel_entities[i]].render;
if (!BoxesOverlap(clipboxmins, clipboxmaxs, ent->mins, ent->maxs))
continue;
*hitnetworkentity = cl.brushmodel_entities[i];
Collision_CombineTraces(&cliptrace, &trace, NULL, true);
}
+
+
+
+
+
+ vec3_t origin, entmins, entmaxs;
+ matrix4x4_t entmatrix, entinversematrix;
+
+ for (i = cl.maxclients;i < cl.num_entities;i++)
+ {
+ entity_render_t *ent = &cl.entities[i].render;
+ entity_state_t *ent_fields = &cl.entities[i].state_current;
+
+ // don't hit players that don't exist
+ if (!cl.entities_active[i])
+ continue;
+ if (ent_fields->solid == SOLID_NOT || ent_fields->solid == SOLID_NOTNETWORKED)
+ continue;
+
+ Matrix4x4_OriginFromMatrix(&ent->matrix, origin);
+ VectorAdd(origin, ent_fields->mins, entmins);
+ VectorAdd(origin, ent_fields->maxs, entmaxs);
+ if (!BoxesOverlap(clipboxmins, clipboxmaxs, entmins, entmaxs))
+ continue;
+ Matrix4x4_CreateTranslate(&entmatrix, origin[0], origin[1], origin[2]);
+ Matrix4x4_CreateTranslate(&entinversematrix, -origin[0], -origin[1], -origin[2]);
+ Collision_ClipLineToGenericEntity(&trace, NULL, NULL, NULL, ent_fields->mins, ent_fields->maxs, SUPERCONTENTS_BODY, &entmatrix, &entinversematrix, start, end, hitsupercontentsmask, skipsupercontentsmask, skipmaterialflagsmask, extend, hitsurfaces);
+ if (cliptrace.fraction > trace.fraction && hitnetworkentity)
+ *hitnetworkentity = i;
+ Collision_CombineTraces(&cliptrace, &trace, NULL, false);
+ }
}
// collide against player entities
for (i = 1;i <= cl.maxclients;i++)
{
entity_render_t *ent = &cl.entities[i].render;
+ entity_state_t *ent_fields = &cl.entities[i].state_current;
// don't hit ourselves
if (i == cl.playerentity)
// don't hit players that don't exist
if (!cl.entities_active[i])
continue;
+ if (ent_fields->solid == SOLID_NOT)
+ continue;
if (!cl.scores[i-1].name[0])
continue;
{
for (i = 0;i < cl.num_brushmodel_entities;i++)
{
+ entity_state_t *ent_fields = &cl.entities[cl.brushmodel_entities[i]].state_current;
+ if (ent_fields->solid == SOLID_NOT)
+ continue;
+
entity_render_t *ent = &cl.entities[cl.brushmodel_entities[i]].render;
if (!BoxesOverlap(clipboxmins, clipboxmaxs, ent->mins, ent->maxs))
continue;
*hitnetworkentity = cl.brushmodel_entities[i];
Collision_CombineTraces(&cliptrace, &trace, NULL, true);
}
+
+
+ vec3_t origin, entmins, entmaxs;
+ matrix4x4_t entmatrix, entinversematrix;
+
+ for (i = cl.maxclients;i < cl.num_entities;i++)
+ {
+ entity_render_t *ent = &cl.entities[i].render;
+ entity_state_t *ent_fields = &cl.entities[i].state_current;
+
+ // don't hit players that don't exist
+ if (!cl.entities_active[i])
+ continue;
+ if (ent_fields->solid == SOLID_NOT || ent_fields->solid == SOLID_NOTNETWORKED)
+ continue;
+
+ Matrix4x4_OriginFromMatrix(&ent->matrix, origin);
+ VectorAdd(origin, ent_fields->mins, entmins);
+ VectorAdd(origin, ent_fields->maxs, entmaxs);
+ if (!BoxesOverlap(clipboxmins, clipboxmaxs, entmins, entmaxs))
+ continue;
+ Matrix4x4_CreateTranslate(&entmatrix, origin[0], origin[1], origin[2]);
+ Matrix4x4_CreateTranslate(&entinversematrix, -origin[0], -origin[1], -origin[2]);
+
+ //if (ent_fields->solid == SOLID_BSP)
+ // Collision_ClipToGenericEntity(&trace, ent->model, ent->frameblend, ent->skeleton, vec3_origin, vec3_origin, 0, &entmatrix, &entinversematrix, start, mins, maxs, end, hitsupercontentsmask, skipsupercontentsmask, skipmaterialflagsmask, extend);
+ //else
+ Collision_ClipToGenericEntity(&trace, NULL, NULL, NULL, ent_fields->mins, ent_fields->maxs, SUPERCONTENTS_BODY, &entmatrix, &entinversematrix, start, mins, maxs, end, hitsupercontentsmask, skipsupercontentsmask, skipmaterialflagsmask, extend);
+
+ if (cliptrace.fraction > trace.fraction && hitnetworkentity)
+ *hitnetworkentity = i;
+ Collision_CombineTraces(&cliptrace, &trace, NULL, false);
+ }
}
// collide against player entities
for (i = 1;i <= cl.maxclients;i++)
{
entity_render_t *ent = &cl.entities[i].render;
+ entity_state_t *ent_fields = &cl.entities[i].state_current;
// don't hit ourselves
if (i == cl.playerentity)
// don't hit players that don't exist
if (!cl.entities_active[i])
continue;
+ if (ent_fields->solid == SOLID_NOT)
+ continue;
if (!cl.scores[i-1].name[0])
continue;
}
if (bits & E5_TRAILEFFECTNUM)
s->traileffectnum = (unsigned short) MSG_ReadShort(&cl_message);
+ if (bits & E5_SOLID)
+ {
+ s->solid = MSG_ReadByte(&cl_message);
+
+ if (s->solid != SOLID_NOT && s->solid != SOLID_BSP)
+ {
+ s->mins[0] = MSG_ReadCoord32f(&cl_message);
+ s->mins[1] = MSG_ReadCoord32f(&cl_message);
+ s->mins[2] = MSG_ReadCoord32f(&cl_message);
+ s->maxs[0] = MSG_ReadCoord32f(&cl_message);
+ s->maxs[1] = MSG_ReadCoord32f(&cl_message);
+ s->maxs[2] = MSG_ReadCoord32f(&cl_message);
+ }
+ }
bytes = cl_message.readcount - startoffset;
if (bits & U_GLOWTRAIL) s.flags |= RENDER_GLOWTRAIL;
if (bits & U_FRAME2) s.frame = (s.frame & 0x00FF) | (MSG_ReadByte(&cl_message) << 8);
if (bits & U_MODEL2) s.modelindex = (s.modelindex & 0x00FF) | (MSG_ReadByte(&cl_message) << 8);
+ if (bits & U_SOLID) s.solid = MSG_ReadByte(&cl_message);
if (bits & U_VIEWMODEL) s.flags |= RENDER_VIEWMODEL;
if (bits & U_EXTERIORMODEL) s.flags |= RENDER_EXTERIORMODEL;
+
// LadyHavoc: to allow playback of the Nehahra movie
if (cls.protocol == PROTOCOL_NEHAHRAMOVIE && (bits & U_EXTEND1))
// ridiculous value rejection (matches qw)
if (cl.cmd.msec > 250)
cl.cmd.msec = 100;
- cl.cmd.frametime = cl.cmd.msec * (1.0 / 1000.0);
+ cl.cmd.frametime = cl.cmd.time - (cl.movecmd[1].time);//cl.cmd.msec * (1.0 / 1000.0);
switch(cls.protocol)
{
else
{
// LadyHavoc: we only let the qc set certain flags, others are off-limits
- flags = (int)PRVM_G_FLOAT(OFS_PARM6) & (CHANNELFLAG_RELIABLE | CHANNELFLAG_FORCELOOP | CHANNELFLAG_PAUSED | CHANNELFLAG_FULLVOLUME);
+ flags = (int)PRVM_G_FLOAT(OFS_PARM6) & (CHANNELFLAG_RELIABLE | CHANNELFLAG_FORCELOOP | CHANNELFLAG_PAUSED | CHANNELFLAG_FULLVOLUME | CHANNELFLAG_BGMVOLUME);
}
// sound_starttime exists instead of sound_startposition because in a
VectorCopy(diffusenormal, PRVM_clientglobalvector(getlight_dir));
}
+
+// DOOMBRINGER extensions
+
+
+
+
+
//============================================================================
//[515]: SCENE MANAGER builtins
{
VectorCopy(cl.movecmd[i].viewangles, PRVM_clientglobalvector(input_angles));
PRVM_clientglobalfloat(input_buttons) = cl.movecmd[i].buttons; // FIXME: this should not be directly exposed to csqc (translation layer needed?)
+ PRVM_clientglobalfloat(input_impulse) = cl.movecmd[i].impulse;
PRVM_clientglobalvector(input_movevalues)[0] = cl.movecmd[i].forwardmove;
PRVM_clientglobalvector(input_movevalues)[1] = cl.movecmd[i].sidemove;
PRVM_clientglobalvector(input_movevalues)[2] = cl.movecmd[i].upmove;
s.cmd.sidemove = PRVM_clientglobalvector(input_movevalues)[1];
s.cmd.upmove = PRVM_clientglobalvector(input_movevalues)[2];
s.cmd.buttons = PRVM_clientglobalfloat(input_buttons);
+ s.cmd.impulse = PRVM_clientglobalfloat(input_impulse);
s.cmd.frametime = PRVM_clientglobalfloat(input_timelength);
s.cmd.jump = (s.cmd.buttons & 2) != 0;
s.cmd.crouch = (s.cmd.buttons & 16) != 0;
VM_pow, // #97 float(float f, float f) pow (DP_QC_SINCOSSQRTPOW)
VM_findfloat, // #98 entity(entity start, .float fld, float match) findfloat (DP_QC_FINDFLOAT)
VM_checkextension, // #99 float(string s) checkextension (the basis of the extension system)
-// FrikaC and Telejano range #100-#199
+// FrikaC and Telejano range #100-#179
NULL, // #100
NULL, // #101
NULL, // #102
NULL, // #177
NULL, // #178
NULL, // #179
+// DOOMBRINGER range #180-#199
NULL, // #180
NULL, // #181
NULL, // #182
VectorCopy(cl.viewangles, PRVM_clientglobalvector(input_angles));
// // FIXME: this actually belongs into getinputstate().. [12/17/2007 Black]
PRVM_clientglobalfloat(input_buttons) = cl.movecmd[0].buttons;
+ PRVM_clientglobalfloat(input_impulse) = cl.movecmd[0].impulse;
VectorSet(PRVM_clientglobalvector(input_movevalues), cl.movecmd[0].forwardmove, cl.movecmd[0].sidemove, cl.movecmd[0].upmove);
VectorCopy(cl.csqc_vieworiginfromengine, cl.csqc_vieworigin);
VectorCopy(cl.csqc_viewanglesfromengine, cl.csqc_viewangles);
PRVM_clientglobalfloat(maxclients) = cl.maxclients;
PRVM_clientglobalfloat(player_localentnum) = cl.viewentity;
+
+ char temp[128];
+ InfoString_GetValue(cls.userinfo, "*ip", temp, sizeof(temp));
+ PRVM_clientglobalstring(server_ip) = PRVM_SetEngineString(prog, temp);
+ //Con_Printf(PRVM_clientglobalstring(server_ip));
+ //Con_Printf("\n");
CSQC_R_RecalcView();
CSQC_END
LDFLAGS_WINSV=$(LDFLAGS_WINCOMMON) $(LIB_CRYPTO) $(LIB_CRYPTO_RIJNDAEL) -mconsole -lwinmm -lws2_32 $(LIB_Z) $(LIB_JPEG)
LDFLAGS_WINSDL=$(LDFLAGS_WINCOMMON) $(LIB_CRYPTO) $(LIB_CRYPTO_RIJNDAEL) $(LDFLAGS_UNIXSDL) -lwinmm -lws2_32 $(LIB_Z) $(LIB_JPEG) $(LIB_SND_XMP)
EXE_WINSV=darkplaces-dedicated.exe
-EXE_WINSDL=darkplaces-sdl.exe
+EXE_WINSDL=doombringer.exe
EXE_WINSVNEXUIZ=nexuiz-dedicated.exe
EXE_WINSDLNEXUIZ=nexuiz-sdl.exe
#include "quakedef.h"
-// this is 88 bytes (must match entity_state_t in protocol.h)
+// this is 89 bytes (must match entity_state_t in protocol.h)
entity_state_t defaultstate =
{
// ! means this is not sent to client
0,//unsigned char tagindex;
{32, 32, 32},//unsigned char colormod[3];
{32, 32, 32},//unsigned char glowmod[3];
+ SOLID_NOTNETWORKED,//unsigned char solid; <-- Added by Reki for DOOMBRINGER
};
// LadyHavoc: I own protocol ranges 96, 97, 3500-3599
#define U_FRAME2 (1<<26) // 1 byte, this is .frame & 0xFF00 (second byte)
#define U_MODEL2 (1<<27) // 1 byte, this is .modelindex & 0xFF00 (second byte)
#define U_EXTERIORMODEL (1<<28) // causes this model to not be drawn when using a first person view (third person will draw it, first person will not)
-#define U_UNUSED29 (1<<29) // future expansion
+#define U_SOLID (1<<29) // REKI: Solid state
#define U_UNUSED30 (1<<30) // future expansion
#define U_EXTEND3 (1<<31) // another byte to follow, future expansion
unsigned char tagindex;
unsigned char colormod[3];
unsigned char glowmod[3];
+ unsigned char solid;
+ float mins[3];
+ float maxs[3];
// LadyHavoc: very big data here :(
framegroupblend_t framegroupblend[4];
skeleton_t skeletonobject;
// reads a frame from the network stream
void EntityFrame4_CL_ReadFrame(void);
+
+//CSQC Flags
+#define CSQCFLAG_SOLIDITY (1<<0)
+
+
// reset all entity fields (typically used if status changed)
#define E5_FULLUPDATE (1<<0)
// E5_ORIGIN32=0: short[3] = s->origin[0] * 8, s->origin[1] * 8, s->origin[2] * 8
#define E5_COMPLEXANIMATION (1<<25)
// ushort traileffectnum
#define E5_TRAILEFFECTNUM (1<<26)
-// unused
-#define E5_UNUSED27 (1<<27)
+// REKI: solid flag for prediction
+#define E5_SOLID (1<<27)
// unused
#define E5_UNUSED28 (1<<28)
// unused
PRVM_DECLARE_clientglobalvector(getlight_diffuse)
PRVM_DECLARE_clientglobalvector(getlight_dir)
PRVM_DECLARE_clientglobalfloat(input_buttons)
+PRVM_DECLARE_clientglobalfloat(input_impulse)
PRVM_DECLARE_clientglobalfloat(input_timelength)
PRVM_DECLARE_clientglobalfloat(intermission)
PRVM_DECLARE_clientglobalfloat(maxclients)
PRVM_DECLARE_clientglobalfloat(transparent_offset)
PRVM_DECLARE_clientglobalstring(gettaginfo_name)
PRVM_DECLARE_clientglobalstring(mapname)
+PRVM_DECLARE_clientglobalstring(server_ip)
PRVM_DECLARE_clientglobalstring(trace_dphittexturename)
PRVM_DECLARE_clientglobalvector(dmg_origin)
PRVM_DECLARE_clientglobalvector(drawfontscale)
PRVM_DECLARE_field(colormap)
PRVM_DECLARE_field(colormod)
PRVM_DECLARE_field(contentstransition)
+PRVM_DECLARE_field(csqcflags)
PRVM_DECLARE_field(crypto_encryptmethod)
PRVM_DECLARE_field(crypto_idfp)
PRVM_DECLARE_field(crypto_idfp_signed)
PRVM_DECLARE_global(getlight_dir)
PRVM_DECLARE_global(input_angles)
PRVM_DECLARE_global(input_buttons)
+PRVM_DECLARE_global(input_impulse)
PRVM_DECLARE_global(input_movevalues)
PRVM_DECLARE_global(input_timelength)
PRVM_DECLARE_global(intermission)
PRVM_DECLARE_global(killed_monsters)
PRVM_DECLARE_global(mapname)
+PRVM_DECLARE_global(server_ip)
PRVM_DECLARE_global(maxclients)
PRVM_DECLARE_global(movevar_accelerate)
PRVM_DECLARE_global(movevar_airaccelerate)
PRVM_DECLARE_serverfieldfloat(clientcolors)
PRVM_DECLARE_serverfieldfloat(clipgroup)
PRVM_DECLARE_serverfieldfloat(colormap)
+PRVM_DECLARE_serverfieldfloat(csqcflags)
PRVM_DECLARE_serverfieldfloat(currentammo)
PRVM_DECLARE_serverfieldfloat(cursor_active)
PRVM_DECLARE_serverfieldfloat(deadflag)
void Sbar_Init (void)
{
- if(gamemode == GAME_NORMAL) // Workaround so Quake doesn't trample on Xonotic.
+ if(gamemode == GAME_NORMAL || gamemode == GAME_DOOMBRINGER ) // Workaround so Quake doesn't trample on Xonotic.
{
Cmd_AddCommand(CF_CLIENT, "+showscores", Sbar_ShowScores_f, "show scoreboard");
Cmd_AddCommand(CF_CLIENT, "-showscores", Sbar_DontShowScores_f, "hide scoreboard");
#define SOLID_BSP 4 ///< bsp clip, touch on edge, block
// LadyHavoc: corpse code
#define SOLID_CORPSE 5 ///< same as SOLID_BBOX, except it behaves as SOLID_NOT against SOLID_SLIDEBOX objects (players/monsters)
+#define SOLID_NOTNETWORKED 11 ///< Reki: added this to keep old "assumed" behavior for networked objects
// LadyHavoc: physics
// VorteX: now these fields are deprecated, as geomtype is more flexible
#define SOLID_PHYSICS_BOX 32 ///< physics object (mins, maxs, mass, origin, axis_forward, axis_left, axis_up, velocity, spinvelocity)
// If this channel does not manage its own volume (like CD tracks)
if (!(ch->flags & CHANNELFLAG_FULLVOLUME))
- mastervol *= volume.value;
+ {
+ if ((ch->flags & CHANNELFLAG_BGMVOLUME))
+ mastervol *= bgmvolume.value;
+ else
+ mastervol *= volume.value;
+ }
if(snd_maxchannelvolume.value > 0)
{
if (flag != CHANNELFLAG_FORCELOOP &&
flag != CHANNELFLAG_PAUSED &&
flag != CHANNELFLAG_FULLVOLUME &&
+ flag != CHANNELFLAG_BGMVOLUME &&
flag != CHANNELFLAG_LOCALSOUND)
return false;
#define CHANNELFLAG_LOCALSOUND (1 << 2) // INTERNAL USE. Not settable by S_SetChannelFlag
#define CHANNELFLAG_PAUSED (1 << 3) // pause status
#define CHANNELFLAG_FULLVOLUME (1 << 4) // isn't affected by the general volume
+#define CHANNELFLAG_BGMVOLUME (1 << 8) // uses bgmvolume instead of volume
// ====================================================================
// Types and variables
}
if (o->traileffectnum != n->traileffectnum)
bits |= E5_TRAILEFFECTNUM;
+ if (o->solid != n->solid)
+ bits |= E5_SOLID;
}
else
if (o->active == ACTIVE_NETWORK)
}
if (bits & E5_TRAILEFFECTNUM)
MSG_WriteShort(msg, s->traileffectnum);
+ if (bits & E5_SOLID)
+ {
+ MSG_WriteByte(msg, s->solid);
+
+ if (s->solid != SOLID_NOT && s->solid != SOLID_BSP)
+ {
+ MSG_WriteCoord32f(msg, s->mins[0]);
+ MSG_WriteCoord32f(msg, s->mins[1]);
+ MSG_WriteCoord32f(msg, s->mins[2]);
+ MSG_WriteCoord32f(msg, s->maxs[0]);
+ MSG_WriteCoord32f(msg, s->maxs[1]);
+ MSG_WriteCoord32f(msg, s->maxs[2]);
+ }
+ }
ENTITYSIZEPROFILING_END(msg, s->number, bits);
}
}
bits |= U_GLOWCOLOR;
if (!VectorCompare(baseline.colormod, s->colormod))
bits |= U_COLORMOD;
+ if (baseline.solid != s->solid)
+ bits |= U_SOLID;
// if extensions are disabled, clear the relevant update flags
if (sv.protocol == PROTOCOL_QUAKE || sv.protocol == PROTOCOL_NEHAHRAMOVIE)
if (bits & U_COLORMOD) {int c = ((int)bound(0, s->colormod[0] * (7.0f / 32.0f), 7) << 5) | ((int)bound(0, s->colormod[1] * (7.0f / 32.0f), 7) << 2) | ((int)bound(0, s->colormod[2] * (3.0f / 32.0f), 3) << 0);MSG_WriteByte(&buf, c);}
if (bits & U_FRAME2) MSG_WriteByte(&buf, s->frame >> 8);
if (bits & U_MODEL2) MSG_WriteByte(&buf, s->modelindex >> 8);
-
+ if (bits & U_SOLID) MSG_WriteByte(&buf, s->solid);
+
// the nasty protocol
if ((bits & U_EXTEND1) && sv.protocol == PROTOCOL_NEHAHRAMOVIE)
{
PRVM_serveredictvector(ent, velocity)[2] -= gravity * 0.5f;
}
}
-
+
+ //Con_Printf("SSQC: %d\n", blocked);
+
return blocked;
}
VectorCopy (PRVM_serveredictvector(ent, velocity), start_velocity);
clip = SV_FlyMove (ent, sv.frametime, applygravity, NULL, hitsupercontentsmask, skipsupercontentsmask, skipmaterialflagsmask, sv_gameplayfix_stepmultipletimes.integer ? sv_stepheight.value : 0);
-
if(sv_gameplayfix_downtracesupportsongroundflag.integer)
if(!(clip & 1))
{
// call player physics, this needs the proper frametime
PRVM_serverglobalfloat(frametime) = sv.frametime;
SV_PlayerPhysics();
+
+ // perform movetype behaviour
+ // note: will always be MOVETYPE_WALK if disableclientprediction = 0
+ SV_Physics_ClientEntity_NoThink (ent);
// call standard client pre-think, with frametime = 0
PRVM_serverglobalfloat(time) = sv.time;
// make sure the velocity is sane (not a NaN)
SV_CheckVelocity(ent);
- // perform movetype behaviour
- // note: will always be MOVETYPE_WALK if disableclientprediction = 0
- SV_Physics_ClientEntity_NoThink (ent);
-
// call standard player post-think, with frametime = 0
PRVM_serverglobalfloat(time) = sv.time;
PRVM_serverglobalfloat(frametime) = 0;
cs->tagindex = (unsigned char)PRVM_serveredictfloat(ent, tag_index);
cs->glowsize = glowsize;
cs->traileffectnum = PRVM_serveredictfloat(ent, traileffectnum);
+
+ int csqcflags = (int)(PRVM_serveredictfloat(ent, csqcflags));
+ if (csqcflags & CSQCFLAG_SOLIDITY)
+ {
+ cs->solid = PRVM_serveredictfloat(ent, solid);
+ VectorCopy(PRVM_serveredictvector(ent, mins), cs->mins);
+ VectorCopy(PRVM_serveredictvector(ent, maxs), cs->maxs);
+ }
// don't need to init cs->colormod because the defaultstate did that for us
//cs->colormod[0] = cs->colormod[1] = cs->colormod[2] = 32;
PRVM_serveredictvector(host_client->edict, angles)[PITCH] = -v_angle[PITCH]/3;
PRVM_serveredictvector(host_client->edict, angles)[YAW] = v_angle[YAW];
}
-
if ( (int)PRVM_serveredictfloat(host_client->edict, flags) & FL_WATERJUMP )
{
SV_WaterJump ();
else
{
// LadyHavoc: we only let the qc set certain flags, others are off-limits
- flags = (int)PRVM_G_FLOAT(OFS_PARM6) & (CHANNELFLAG_RELIABLE | CHANNELFLAG_FORCELOOP | CHANNELFLAG_PAUSED | CHANNELFLAG_FULLVOLUME);
+ flags = (int)PRVM_G_FLOAT(OFS_PARM6) & (CHANNELFLAG_RELIABLE | CHANNELFLAG_FORCELOOP | CHANNELFLAG_PAUSED | CHANNELFLAG_FULLVOLUME | CHANNELFLAG_BGMVOLUME);
}
if (nvolume < 0 || nvolume > 255)
PRVM_G_FLOAT(OFS_RETURN) = model->animscenes[framenum].framecount / model->animscenes[framenum].framerate;
}
+// #277 void(entity e) touchtriggers = #279;
+static void VM_SV_touchtriggers(prvm_prog_t *prog)
+{
+ prvm_edict_t *ed = PRVM_G_EDICT(OFS_PARM0);
+ SV_LinkEdict_TouchAreaGrid(ed);
+}
+
prvm_builtin_t vm_sv_builtins[] = {
NULL, // #0 NULL function (not callable) (QUAKE)
VM_SV_frameforname, // #276 float(float modlindex, string framename) frameforname = #276; // (DP_SKELETONOBJECTS) finds number of a specified frame in the animation, returns -1 if no match found
VM_SV_frameduration, // #277 float(float modlindex, float framenum) frameduration = #277; // (DP_SKELETONOBJECTS) returns the intended play time (in seconds) of the specified framegroup, if it does not exist the result is 0, if it is a single frame it may be a small value around 0.1 or 0.
NULL, // #278
-NULL, // #279
+VM_SV_touchtriggers, // #279
NULL, // #280
NULL, // #281
NULL, // #282