- movement-fixes

This commit is contained in:
Christian Schlittchen 2002-09-29 20:36:15 +00:00
parent 4371ebab96
commit 1fc035fe4e
3 changed files with 16 additions and 4 deletions

View File

@ -30,6 +30,7 @@
#include "racename.h"
#include "raceprefix.h"
#include "synonym.h"
#include "at_movement.h"
#ifdef USE_UGROUPS
# include "ugroup.h"
#endif
@ -62,6 +63,7 @@ init_attributes(void)
init_otherfaction();
init_racename();
init_synonym();
init_movement();
init_moved();
#ifdef AT_OPTION

View File

@ -727,11 +727,11 @@ void
read_alliances(FILE * F)
{
char pbuf[32];
rns(F, pbuf, sizeof(pbuf));
rs(F, pbuf);
while (strcmp(pbuf, "end")!=0) {
rs(F, buf);
makealliance(atoi36(pbuf), buf);
rns(F, pbuf, sizeof(pbuf));
rs(F, pbuf);
}
}
#endif
@ -818,7 +818,7 @@ readgame(boolean backup)
/* Read factions */
#ifdef ALLIANCES
if (global.data_version>ALLIANCES_VERSION) {
if (global.data_version>=ALLIANCES_VERSION) {
read_alliances(F);
}
#endif

View File

@ -34,6 +34,8 @@
#include <unit.h>
#include <base36.h>
#include <attributes/at_movement.h>
/* libc includes */
#include <ctype.h>
#include <stdlib.h>
@ -51,7 +53,7 @@ SpecialFunctionUnit(unit *u)
win = openwin(60, 5, "< Specials Units >");
wmove(win, 1, 2);
wAddstr("B - give balloon");
wAddstr("B - give balloon, M - set noMovement");
wmove(win, 2, 2);
wrefresh(win);
switch(getch()) {
@ -70,6 +72,10 @@ SpecialFunctionUnit(unit *u)
fset(u, FL_OWNER);
}
break;
case 'm':
case 'M':
set_movement(&u->attribs, MV_CANNOTMOVE);
break;
}
delwin(win);
}
@ -871,6 +877,10 @@ mapper_spunit(dbllist ** SP, unit * u, int indent)
break;
}
if(get_movement(&u->attribs, MV_CANNOTMOVE)) {
sncat(buf, ", cannot move", BUFSIZE);
}
sncat(buf, " (", BUFSIZE); icat(u->hp/u->number); sncat(buf, " HP)", BUFSIZE);
if (getguard(u))