The problem is caused by builtin function names being stripped from the progs, and the unforgiven progs using movetogoal in the th_goal function field .
The fix is a two step process:
- modify the builtin function table(s) to store the function name as well as the function pointer.
- modify the progs loader to run through the progs functions (the dfunction_t table) looking for unnamed function defs that refer to builtins, and set the name appropriately using the builtin number to find the function name from the table(s) modified in step 1.
For the names in step 1, I very strongly suggest that standard names are used. For id standard builtins, that means the names as in id's defs.qc. For standard extension functions, then the prevailing standard name. If that's a mess, then fix it For engine specific functions, it doesn't really matter as those progs wouldn't work in other engines anyway