mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 06:10:56 +00:00
Undo the func field as selector patch.
The support code for the patch is left intact (it will be needed later), but idea is too cumbersome for working with existing progs.
This commit is contained in:
parent
237f11c472
commit
37b0648ec7
1 changed files with 8 additions and 24 deletions
|
@ -34,7 +34,6 @@
|
|||
|
||||
#include "QF/link.h"
|
||||
#include "QF/progs.h"
|
||||
#include "QF/ruamoko.h"
|
||||
|
||||
#include "qw/protocol.h"
|
||||
#include "sv_pr_cmds.h"
|
||||
|
@ -217,21 +216,16 @@ static inline void
|
|||
sv_pr_touch (edict_t *self, edict_t *other)
|
||||
{
|
||||
pr_int_t this;
|
||||
func_t touch;
|
||||
|
||||
touch = SVfunc (self, touch);
|
||||
*sv_globals.self = EDICT_TO_PROG (&sv_pr_state, self);
|
||||
*sv_globals.other = EDICT_TO_PROG (&sv_pr_state, other);
|
||||
if ((this = sv_pr_state.fields.this) != -1
|
||||
&& E_POINTER (self, this)) {
|
||||
if ((this = sv_pr_state.fields.this) != -1) {
|
||||
PR_RESET_PARAMS (&sv_pr_state);
|
||||
P_INT (&sv_pr_state, 0) = E_POINTER (self, this);
|
||||
P_INT (&sv_pr_state, 1) = touch;
|
||||
P_INT (&sv_pr_state, 1) = 0;
|
||||
P_INT (&sv_pr_state, 2) = E_POINTER (other, this);
|
||||
touch = RUA_Obj_msg_lookup (&sv_pr_state, E_POINTER (self, this),
|
||||
touch);
|
||||
}
|
||||
PR_ExecuteProgram (&sv_pr_state, touch);
|
||||
PR_ExecuteProgram (&sv_pr_state, SVfunc (self, touch));
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
@ -243,40 +237,30 @@ static inline void
|
|||
sv_pr_think (edict_t *self)
|
||||
{
|
||||
pr_int_t this;
|
||||
func_t think;
|
||||
|
||||
think = SVfunc (self, think);
|
||||
*sv_globals.self = EDICT_TO_PROG (&sv_pr_state, self);
|
||||
*sv_globals.other = 0;
|
||||
if ((this = sv_pr_state.fields.this) != -1
|
||||
&& E_POINTER (self, this)) {
|
||||
if ((this = sv_pr_state.fields.this) != -1) {
|
||||
PR_RESET_PARAMS (&sv_pr_state);
|
||||
P_INT (&sv_pr_state, 0) = E_POINTER (self, this);
|
||||
P_INT (&sv_pr_state, 1) = think;
|
||||
P_INT (&sv_pr_state, 1) = 0;
|
||||
P_INT (&sv_pr_state, 2) = 0;
|
||||
think = RUA_Obj_msg_lookup (&sv_pr_state, E_POINTER (self, this),
|
||||
think);
|
||||
}
|
||||
PR_ExecuteProgram (&sv_pr_state, think);
|
||||
PR_ExecuteProgram (&sv_pr_state, SVfunc (self, think));
|
||||
}
|
||||
|
||||
static inline void
|
||||
sv_pr_blocked (edict_t *self, edict_t *other)
|
||||
{
|
||||
pr_int_t this;
|
||||
func_t blocked;
|
||||
|
||||
blocked = SVfunc (self, blocked);
|
||||
*sv_globals.self = EDICT_TO_PROG (&sv_pr_state, self);
|
||||
*sv_globals.other = EDICT_TO_PROG (&sv_pr_state, other);
|
||||
if ((this = sv_pr_state.fields.this) != -1
|
||||
&& E_POINTER (self, this)) {
|
||||
if ((this = sv_pr_state.fields.this) != -1) {
|
||||
PR_RESET_PARAMS (&sv_pr_state);
|
||||
P_INT (&sv_pr_state, 0) = E_POINTER (self, this);
|
||||
P_INT (&sv_pr_state, 1) = blocked;
|
||||
P_INT (&sv_pr_state, 1) = 0;
|
||||
P_INT (&sv_pr_state, 2) = E_POINTER (other, this);
|
||||
blocked = RUA_Obj_msg_lookup (&sv_pr_state, E_POINTER (self, this),
|
||||
blocked);
|
||||
}
|
||||
PR_ExecuteProgram (&sv_pr_state, SVfunc (self, blocked));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue