4{
6 {
8 return;
9 }
10
12 {
13
18 break;
19
22 {
25 this.angles_x -= 360.0 *
floor(this.angles_x * (1.0 / 360.0));
27 this.angles_z -= 360.0 *
floor(this.angles_z * (1.0 / 360.0));
30 return;
31 }
32 default:
33 {
34 LOG_INFOF(
"_Movetype_Physics_Push: entity #%d, unrecognized solid type %d",
etof(
this), this.
solid);
35 return;
36 }
37 }
39 {
41 return;
42 }
43
45
46 vector move1 = this.velocity * dt;
47 vector moveangle = this.avelocity * dt;
48
52 left *= -1;
53
57
58
59
64
66 {
67 this.angles_x -= 360.0 *
floor(this.angles_x * (1.0 / 360.0));
69 this.angles_z -= 360.0 *
floor(this.angles_z * (1.0 / 360.0));
70 return;
71 }
72
74
76 {
77 switch(check.move_movetype)
78 {
84 continue;
85 default:
86 break;
87 }
88
89 if(check.owner == this || this.owner == check)
90 continue;
91
92
93
94
95 if (!
IS_ONGROUND(check) || check.groundentity !=
this)
96 {
97 tracebox(check.origin, check.mins, check.maxs, check.origin,
MOVE_NOMONSTERS, check);
99 continue;
100 }
101 vector pivot = check.mins + 0.5 * (check.maxs - check.mins);
103
104 if(rotated)
105 {
108
110 org2.x = (
org * forward);
111 org2.y = (
org * left);
114 move = move + move1;
115 }
116 else
117 move = move1;
118
119 check.moved_from = check.origin;
120 check.moved_fromangles = check.angles;
122
123
125 {
126 check.origin = check.origin + move;
128 continue;
129 }
130
131
132 int savesolid = this.
solid;
135 {
136
138 this.
solid = savesolid;
139 continue;
140 }
141
143 this.
solid = savesolid;
144
145
146
147
150
151
152 tracebox(check.origin, check.mins, check.maxs, check.origin,
MOVE_NOMONSTERS, check);
154 {
156 {
157
159
160 continue;
161 }
162
163
164
165
166 if(check.mins_x == check.maxs_x)
167 continue;
169 {
170
171 check.mins_x = check.mins_y = 0;
172 check.maxs = check.mins;
173 continue;
174 }
175
180
181
183 {
184 check.origin = check.moved_from;
185 check.angles = check.moved_fromangles;
187 });
188
189
192 break;
193 }
194 }
195 this.angles_x -= 360.0 *
floor(this.angles_x * (1.0 / 360.0));
197 this.angles_z -= 360.0 *
floor(this.angles_z * (1.0 / 360.0));
199}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
const float MOVE_NOMONSTERS
const float SOLID_SLIDEBOX
const float SOLID_TRIGGER
#define MAKE_VECTORS(angles, forward, right, up)
Same as the makevectors builtin but uses the provided locals instead of the v_* globals.
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define IL_EACH(this, cond, body)
#define IL_CLEAR(this)
Remove all elements.
void _Movetype_LinkEdict(entity this, bool touch_triggers)
bool _Movetype_PushEntity(entity this, vector push, bool dolink)
bool _Movetype_NudgeOutOfSolid_PivotIsKnownGood(entity this, vector pivot)
const int MOVETYPE_FOLLOW
const int MOVETYPE_FAKEPUSH
const int MOVETYPE_FLY_WORLDONLY
#define UNSET_ONGROUND(s)
const int MOVETYPE_PHYSICS
const int MOVETYPE_NOCLIP
IntrusiveList g_pushmove_moved