edit: Teleport planes and land units to carrier on load
Edit lets deities load units onto remote carriers, resulting in a carriers having cargo in another sector. Not good. Cargo gets teleported to its carrier belatedly when the carrier moves. Better let edit take care of the teleport. Also tell the deity that he just caused a teleport. Necessary to give the deity a chance to catch unexpected changes, e.g. a player moving a plane right before the deity edits it. Watching out for such changes is especially important with non-interactive edit. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
3dceefbbc9
commit
ef2e2d08a2
6 changed files with 43 additions and 13 deletions
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* Known contributors to this file:
|
||||
* Ron Koenderink, 2006-2007
|
||||
* Markus Armbruster, 2006-2011
|
||||
* Markus Armbruster, 2006-2013
|
||||
*/
|
||||
|
||||
#ifndef UNIT_H
|
||||
|
@ -59,6 +59,7 @@ extern void unit_list(struct emp_qelem *);
|
|||
extern void unit_put(struct emp_qelem *list, natid actor);
|
||||
extern char *unit_path(int, struct empobj *, char *, size_t);
|
||||
extern void unit_view(struct emp_qelem *);
|
||||
extern void unit_teleport(struct empobj *, coord, coord);
|
||||
extern int unit_update_cargo(struct empobj *);
|
||||
extern void unit_drop_cargo(struct empobj *, natid);
|
||||
extern void unit_give_away(struct empobj *, natid, natid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue