Mission variables

The mission variables code handles a lot of important stuff, and without it the mission script parser would be a lot more restrictive. Each variable is stored as a mvar object, and all mvars are stored in a hashed map, indexed by variable name. mvar.c provides a plethora of functions to create variables as well as read and write their values, and convert to and from different formats.

Entity references

Also integral to the smooth running of the mission script system is the entity reference system, handled in ref.c. This allows mission script variables to reference peds, cars, and objects, and for references to be safely deleted when the ped, car or object is removed from the game. Each ref object contains the reference type ('p', 'c', 'o'), a pointer to the object, a pointer to the variable that is referencing the object, and the array index of the variable (if applicable). For each variable that references an entity, there will be a ref object. For each ped/car/object, there is a linked list of refs, detailing the variables that reference the object.

TODO:
CODE: QUICK: Script funcs to identify if ent is ped/car/obj
???
Profit!