1 /* Emacs style mode select -*- C++ -*-
2 *-----------------------------------------------------------------------------
5 * PrBoom a Doom port merged with LxDoom and LSDLDoom
6 * based on BOOM, a modified and improved DOOM engine
7 * Copyright (C) 1999 by
8 * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 * Copyright (C) 1999-2000 by
10 * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
30 *-----------------------------------------------------------------------------*/
38 #define USERANGE (64*FRACUNIT)
39 #define MELEERANGE (64*FRACUNIT)
40 #define MISSILERANGE (32*64*FRACUNIT)
42 // MAXRADIUS is for precalculated sector block boxes the spider demon
43 // is larger, but we do not have any moving sectors nearby
44 #define MAXRADIUS (32*FRACUNIT)
46 // killough 3/15/98: add fourth argument to P_TryMove
47 boolean
P_TryMove(mobj_t
*thing
, fixed_t x
, fixed_t y
, boolean dropoff
);
49 // killough 8/9/98: extra argument for telefragging
50 boolean
P_TeleportMove(mobj_t
*thing
, fixed_t x
, fixed_t y
,boolean boss
);
51 void P_SlideMove(mobj_t
*mo
);
52 boolean
P_CheckSight(mobj_t
*t1
, mobj_t
*t2
);
53 void P_UseLines(player_t
*player
);
55 // killough 8/2/98: add 'mask' argument to prevent friends autoaiming at others
56 fixed_t
P_AimLineAttack(mobj_t
*t1
,angle_t angle
,fixed_t distance
, uint_64_t mask
);
58 void P_LineAttack(mobj_t
*t1
, angle_t angle
, fixed_t distance
,
59 fixed_t slope
, int damage
);
60 void P_RadiusAttack(mobj_t
*spot
, mobj_t
*source
, int damage
);
61 boolean
P_CheckPosition(mobj_t
*thing
, fixed_t x
, fixed_t y
);
63 //jff 3/19/98 P_CheckSector(): new routine to replace P_ChangeSector()
64 boolean
P_ChangeSector(sector_t
* sector
,boolean crunch
);
65 boolean
P_CheckSector(sector_t
*sector
, boolean crunch
);
66 void P_DelSeclist(msecnode_t
*); // phares 3/16/98
67 void P_CreateSecNodeList(mobj_t
*,fixed_t
,fixed_t
); // phares 3/14/98
68 boolean
Check_Sides(mobj_t
*, int, int); // phares
70 int P_GetMoveFactor(const mobj_t
*mo
, int *friction
); // killough 8/28/98
71 int P_GetFriction(const mobj_t
*mo
, int *factor
); // killough 8/28/98
72 void P_ApplyTorque(mobj_t
*mo
); // killough 9/12/98
74 /* cphipps 2004/08/30 */
75 void P_MapStart(void);
78 // If "floatok" true, move would be ok if within "tmfloorz - tmceilingz".
79 extern boolean floatok
;
80 extern boolean felldown
; // killough 11/98: indicates object pushed off ledge
81 extern fixed_t tmfloorz
;
82 extern fixed_t tmceilingz
;
83 extern line_t
*ceilingline
;
84 extern line_t
*floorline
; // killough 8/23/98
85 extern mobj_t
*linetarget
; // who got hit (or NULL)
86 extern msecnode_t
*sector_list
; // phares 3/16/98
87 extern fixed_t tmbbox
[4]; // phares 3/20/98
88 extern line_t
*blockline
; // killough 8/11/98