Actor to unit

Hans Ronne hronne@telia.com
Wed Dec 11 18:49:00 GMT 2002


>  I vauglly remember that6 we decided to usin unit, u, m, etc. as
>parameters to routines so I changed them back in actions.c  I also decided
>to change the description to unit is the pointer to the Unit initiating
>the action.As I thing it describes what is going on better.

If you mean the discussion about whether to keep u, m, a and t as
abbreviations for the four basic data types, yes I think that was the
conclusion. We would need to change the entire kernel code otherwise.

Now, with respect to the unit names in the action functions, I think we
agreed that unit, unit2 and unit3 sometimes is quite confusing. There are
already examples of a better nomenclature in some functions, i.e. attacker
and defender, or transport and occupant. You suggested that extractor
should be used in one case. I would rather see more of these more
informative unit names. It would make it a lot easier to debug and maintain
the code.

One simplification that we also might consider is to remove the unit2
argument in all action functions since the ability to have a separate unit
provide the acps was never implemented. So unit2 is really just an alias
for unit (the actor) everywhere in the action code. This would mean a lot
of changes, though.

Hans




More information about the Xconq7 mailing list