memset (&trace, 0, sizeof(trace));
SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1, start, end, &trace);
- VectorCopy (trace.endpos, impact);
+ if (trace.fraction < 1)
+ {
+ VectorCopy (trace.endpos, impact);
+ }
+ else
+ {
+ VectorCopy (end, impact);
+ }
}
void Chase_Update (void)
CL_Disconnect ();
}
+/*
+======================
+Host_PModel_f
+LordHavoc: Intended for Nehahra, I personally think this is dumb, but Mindcrime won't listen.
+======================
+*/
+void Host_PModel_f (void)
+{
+ int i;
+ eval_t *val;
+
+ if (Cmd_Argc () == 1)
+ {
+ Con_Printf ("usage: pmodel modelnumber\n");
+ return;
+ }
+ i = atoi(Cmd_Argv(1));
+
+ if (cmd_source == src_command)
+ {
+ if (cls.state == ca_connected)
+ Cmd_ForwardToServer ();
+ return;
+ }
+
+ if (val = GETEDICTFIELDVALUE(host_client->edict, eval_pmodel))
+ val->_float = i;
+}
+
//=============================================================================
/*
Cmd_AddCommand ("ping", Host_Ping_f);
Cmd_AddCommand ("load", Host_Loadgame_f);
Cmd_AddCommand ("save", Host_Savegame_f);
+ Cmd_AddCommand ("pmodel", Host_PModel_f);
Cmd_AddCommand ("startdemos", Host_Startdemos_f);
Cmd_AddCommand ("demos", Host_Demos_f);
+++ /dev/null
-/*
-Copyright (C) 1996-1997 Id Software, Inc.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// in_null.c -- for systems without a mouse
-
-#include "quakedef.h"
-
-void IN_Init (void)
-{
-}
-
-void IN_Shutdown (void)
-{
-}
-
-void IN_Commands (void)
-{
-}
-
-void IN_Move (usercmd_t *cmd)
-{
-}
-
+++ /dev/null
-/*
-Copyright (C) 1996-1997 Id Software, Inc.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-#include "quakedef.h"
-
-#include "net_loop.h"
-#include "net_dgrm.h"
-
-net_driver_t net_drivers[MAX_NET_DRIVERS] =
-{
- {
- "Loopback",
- false,
- Loop_Init,
- Loop_Listen,
- Loop_SearchForHosts,
- Loop_Connect,
- Loop_CheckNewConnections,
- Loop_GetMessage,
- Loop_SendMessage,
- Loop_SendUnreliableMessage,
- Loop_CanSendMessage,
- Loop_CanSendUnreliableMessage,
- Loop_Close,
- Loop_Shutdown
- }
- ,
- {
- "Datagram",
- false,
- Datagram_Init,
- Datagram_Listen,
- Datagram_SearchForHosts,
- Datagram_Connect,
- Datagram_CheckNewConnections,
- Datagram_GetMessage,
- Datagram_SendMessage,
- Datagram_SendUnreliableMessage,
- Datagram_CanSendMessage,
- Datagram_CanSendUnreliableMessage,
- Datagram_Close,
- Datagram_Shutdown
- }
-};
-
-int net_numdrivers = 2;
-
-#include "net_udp.h"
-
-net_landriver_t net_landrivers[MAX_NET_DRIVERS] =
-{
- {
- "UDP",
- false,
- 0,
- UDP_Init,
- UDP_Shutdown,
- UDP_Listen,
- UDP_OpenSocket,
- UDP_CloseSocket,
- UDP_Connect,
- UDP_CheckNewConnections,
- UDP_Read,
- UDP_Write,
- UDP_Broadcast,
- UDP_AddrToString,
- UDP_StringToAddr,
- UDP_GetSocketAddr,
- UDP_GetNameFromAddr,
- UDP_GetAddrFromName,
- UDP_AddrCompare,
- UDP_GetSocketPort,
- UDP_SetSocketPort
- }
-};
-
-int net_numlandrivers = 1;
+++ /dev/null
-/*
-Copyright (C) 1996-1997 Id Software, Inc.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-//
-// nonintel.c: code for non-Intel processors only
-//
-
-#include "quakedef.h"
-#include "d_local.h"
-
-#if !id386
-
-/*
-================
-R_Surf8Patch
-================
-*/
-void R_Surf8Patch ()
-{
- // we only patch code on Intel
-}
-
-
-/*
-================
-R_Surf16Patch
-================
-*/
-void R_Surf16Patch ()
-{
- // we only patch code on Intel
-}
-
-
-/*
-================
-R_SurfacePatch
-================
-*/
-void R_SurfacePatch (void)
-{
- // we only patch code on Intel
-}
-
-
-#endif // !id386
-
int eval_colormod;
int eval_ping;
int eval_movement;
+int eval_pmodel;
dfunction_t *SV_PlayerPhysicsQC;
dfunction_t *EndFrameQC;
eval_colormod = FindFieldOffset("colormod");
eval_ping = FindFieldOffset("ping");
eval_movement = FindFieldOffset("movement");
+ eval_pmodel = FindFieldOffset("pmodel");
// LordHavoc: allowing QuakeC to override the player movement code
SV_PlayerPhysicsQC = ED_FindFunction ("SV_PlayerPhysics");
extern int eval_colormod;
extern int eval_ping;
extern int eval_movement;
+extern int eval_pmodel;
#define GETEDICTFIELDVALUE(ed, fieldoffset) (fieldoffset ? (eval_t*)((char*)&ed->v + fieldoffset) : NULL)
|| Q_strncasecmp(s, "kick", 4) == 0
|| Q_strncasecmp(s, "ping", 4) == 0
|| Q_strncasecmp(s, "ban", 3) == 0
+ || Q_strncasecmp(s, "pmodel", 6) == 0
|| (nehahra && (Q_strncasecmp(s, "max", 3) == 0 || Q_strncasecmp(s, "monster", 7) == 0 || Q_strncasecmp(s, "scrag", 5) == 0 || Q_strncasecmp(s, "gimme", 5) == 0 || Q_strncasecmp(s, "wraith", 6) == 0))
|| (!nehahra && (Q_strncasecmp(s, "god", 3) == 0 || Q_strncasecmp(s, "notarget", 8) == 0 || Q_strncasecmp(s, "fly", 3) == 0 || Q_strncasecmp(s, "give", 4) == 0 || Q_strncasecmp(s, "noclip", 6) == 0)))
ret = 1;