From fa82bc9c8c8beefbced445a9baefc0593e76e0b8 Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 28 Jan 2005 19:26:24 +0000 Subject: [PATCH] Fixed custom beams git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@854 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/pr_cmds.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index 853b5469d..a788aa0fc 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -6946,15 +6946,25 @@ void PF_CustomTEnt(progfuncs_t *prinst, struct globalvars_s *pr_globals) type = sv.customtents[type].netstyle; arg = 2; - if (type & CTE_CUSTOMCOUNT) + if (type & CTE_ISBEAM) { - MSG_WriteByte(&sv.multicast, G_FLOAT(OFS_PARM0+arg*3)); + MSG_WriteCoord(&sv.multicast, G_VECTOR(OFS_PARM0+arg*3)[0]); + MSG_WriteCoord(&sv.multicast, G_VECTOR(OFS_PARM0+arg*3)[1]); + MSG_WriteCoord(&sv.multicast, G_VECTOR(OFS_PARM0+arg*3)[2]); arg++; } - if (type & CTE_CUSTOMDIRECTION) + else { - MSG_WriteDir(&sv.multicast, G_VECTOR(OFS_PARM0+arg*3)); - arg++; + if (type & CTE_CUSTOMCOUNT) + { + MSG_WriteByte(&sv.multicast, G_FLOAT(OFS_PARM0+arg*3)); + arg++; + } + if (type & CTE_CUSTOMDIRECTION) + { + MSG_WriteDir(&sv.multicast, G_VECTOR(OFS_PARM0+arg*3)); + arg++; + } } if (arg != *prinst->callargc) Con_Printf("PF_CusromTEnt: bad number of arguments for particle type\n");