Skip to content

Commit

Permalink
better walking
Browse files Browse the repository at this point in the history
  • Loading branch information
ineed bots committed Apr 30, 2024
1 parent 4fc08e0 commit a1a28ae
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions scripts/mp/bots_adapter_libcod.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -102,32 +102,28 @@ do_botstop()
do_botmovement( forward, right )
{
// best i can do for libcod...
self setwalkdir( "none" );

if ( forward > 63 )
{
self setwalkdir( "forward" );
return;
}

if ( right > 63 )
if ( forward < -63 )
{
self setwalkdir( "right" );
return;
self setwalkdir( "back" );
}

if ( forward < -63 )
if ( right > 63 )
{
self setwalkdir( "back" );
return;
self setwalkdir( "right" );
}

if ( right < -63 )
{
self setwalkdir( "left" );
return;
}

self setwalkdir( "none" );

// self botmovement( forward, right );
}

Expand Down

0 comments on commit a1a28ae

Please sign in to comment.