Update of /cvsroot/netrek/server/Vanilla/robots In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15404/robots Modified Files: inl.c Log Message: fix INL confine for orbiting ships Index: inl.c =================================================================== RCS file: /cvsroot/netrek/server/Vanilla/robots/inl.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- inl.c 22 Apr 2006 02:16:46 -0000 1.3 +++ inl.c 6 May 2006 12:28:20 -0000 1.4 @@ -250,6 +250,14 @@ } +static void +inl_confine_deorbit(struct player *j) +{ + if (j->p_flags & PFORBIT) { + j->p_flags &= ~(PFBOMB | PFORBIT | PFBEAMUP | PFBEAMDOWN); + } +} + void inl_confine(void) { @@ -257,14 +265,22 @@ for (j = firstPlayer; j <= lastPlayer; j++) { - if (j->p_x < cbounds[j->p_team][0]) + if (j->p_x < cbounds[j->p_team][0]) { + inl_confine_deorbit(j); j->p_x = cbounds[j->p_team][0]; - if (j->p_y < cbounds[j->p_team][1]) + } + if (j->p_y < cbounds[j->p_team][1]) { + inl_confine_deorbit(j); j->p_y = cbounds[j->p_team][1]; - if (j->p_x > cbounds[j->p_team][2]) + } + if (j->p_x > cbounds[j->p_team][2]) { + inl_confine_deorbit(j); j->p_x = cbounds[j->p_team][2]; - if (j->p_y > cbounds[j->p_team][3]) + } + if (j->p_y > cbounds[j->p_team][3]) { + inl_confine_deorbit(j); j->p_y = cbounds[j->p_team][3]; + } } }