This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug: Tank sitting in water


>>Accordingly, I have removed the check for terrain_always_impassable in
>>check_move_action. This means that stupid moves like jumping overboard at
>>sea or sending spaceships into black holes are permitted again, both to
>>human sides and to the AI. Which, I guess, is as it should be.
>>
>My memory is faded here, but I think at one point it seemed like a good
>idea to disallow stupid moves at the kernel level, otherwise you have
>to add something in each UI and in each AI to prevent unfortunate
>accidents.  Purely for personal safety :-) - didn't want to deal with
>players' homicidal mania when they lost their invasion forces because
>of mistaken mouse twitches!

That makes sense, and I expected the code to work that way. That's why we
put the first fix in check_move_action, where it would block stupid moves.
But when I went back and examined the code more carefully after the
mountain/road bug was reported, I found that there are no checks for stupid
moves in the kernel. The reason why these moves seldom are seen is instead
that mp-to-enter-terrain is set to 99 for bad terrain in most games. So the
safety switch does exist, but at the GDL level.

Jumping overboard is a special case, since you don't enter a new cell.
That's why it was still possible. And there are situations where it might
be useful. Think of a valuable transport being pursued by enemy units and
dumping its occupants into the sea in order to escape.

Hans



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]