- ent = PROG_TO_EDICT(pr_global_struct->self);
- goal = PROG_TO_EDICT(ent->v->goalentity);
- dist = G_FLOAT(OFS_PARM0);
+ VM_SAFEPARMCOUNT(1, SV_MoveToGoal);
+
+ ent = PRVM_PROG_TO_EDICT(prog->globals.server->self);
+ goal = PRVM_PROG_TO_EDICT(ent->fields.server->goalentity);
+ dist = PRVM_G_FLOAT(OFS_PARM0);