- // if the pusher has a "blocked" function, call it, otherwise just stay in place until the obstacle is gone
- if (pusher->v.blocked)
- {
- pr_global_struct->self = EDICT_TO_PROG(pusher);
- pr_global_struct->other = EDICT_TO_PROG(check);
- PR_ExecuteProgram (pusher->v.blocked, "");
+ // move back any entities we already moved
+ for (i=0 ; i<num_moved ; i++)
+ {
+ VectorCopy (moved_from[i], moved_edict[i]->v->origin);
+ VectorCopy (moved_fromangles[i], moved_edict[i]->v->angles);
+ SV_LinkEdict (moved_edict[i], false);
+ }
+
+ // if the pusher has a "blocked" function, call it, otherwise just stay in place until the obstacle is gone
+ if (pusher->v->blocked)
+ {
+ pr_global_struct->self = EDICT_TO_PROG(pusher);
+ pr_global_struct->other = EDICT_TO_PROG(check);
+ PR_ExecuteProgram (pusher->v->blocked, "");
+ }
+ return;