fix: hero movements got screwed up while doing DB caching stuff...

#313
This commit is contained in:
Martin Ambrus
2017-11-17 23:46:01 +01:00
parent bfc7a2b28a
commit 2041ad750e
3 changed files with 8 additions and 12 deletions
+2 -2
View File
@@ -287,7 +287,7 @@ class Units {
}
}
if( intval($enforce['hero']) > 0){
$hero_unit = $database->getHeroField($from['owner'], 'unit')['unit'];
$hero_unit = $database->getHeroField($from['owner'], 'unit');
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
}else{
$enforce['hero']='0';
@@ -654,7 +654,7 @@ class Units {
}
if ( isset( $post['t11'] ) ) {
if ( $post['t11'] != '' && $post['t11'] > 0 ) {
$hero_unit = $database->getHeroField($from['owner'], 'unit')['unit'];
$hero_unit = $database->getHeroField($from['owner'], 'unit');
$speeds[] = $GLOBALS[ 'u' . $hero_unit ]['speed'];
} else {
$post['t11'] = '0';