mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-19 21:10:12 +02:00
[programming challenge] Minor fixes.
This commit is contained in:
parent
3fd579a433
commit
5be8c31d97
@ -478,7 +478,7 @@ void CGameHandler::endBattle(int3 tile, const CGHeroInstance *hero1, const CGHer
|
|||||||
time_t czas;
|
time_t czas;
|
||||||
time(&czas);
|
time(&czas);
|
||||||
std::string resultTypes[] = {"SIDE_DEFEATED", "SIDE_RETREATED", "SIDE_SURRENDERED", "SIDE_DISQUALIFIED"};
|
std::string resultTypes[] = {"SIDE_DEFEATED", "SIDE_RETREATED", "SIDE_SURRENDERED", "SIDE_DISQUALIFIED"};
|
||||||
std::ofstream resultsList(RESULTS_PATH, std::fstream::out | std::fstream::app);
|
std::ofstream resultsList(RESULTS_PATH.c_str(), std::fstream::out | std::fstream::app);
|
||||||
if(resultsList)
|
if(resultsList)
|
||||||
resultsList << boost::format("%s\t%s\t%s\t%d\t%d\t%s\t%s") % gs->scenarioOps->mapname % ais[0] % ais[1] % (int)battleResult.data->winner % casualtiesPoints % resultTypes[battleResult.data->result] % asctime(localtime(&czas));
|
resultsList << boost::format("%s\t%s\t%s\t%d\t%d\t%s\t%s") % gs->scenarioOps->mapname % ais[0] % ais[1] % (int)battleResult.data->winner % casualtiesPoints % resultTypes[battleResult.data->result] % asctime(localtime(&czas));
|
||||||
else
|
else
|
||||||
|
@ -14,7 +14,7 @@ function incusage(){
|
|||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$1" == "reconf" ]; then
|
if [ "$1" = "reconf" ]; then
|
||||||
cd vcmi
|
cd vcmi
|
||||||
autoreconf -i
|
autoreconf -i
|
||||||
cd ..
|
cd ..
|
||||||
@ -37,22 +37,22 @@ if [ "$1" == "--install" ]; then
|
|||||||
errorcheck "fetching sources"
|
errorcheck "fetching sources"
|
||||||
cd vcmi
|
cd vcmi
|
||||||
|
|
||||||
elif [ "$2" = "lean" ]; then
|
if [ "$2" = "lean" ]; then
|
||||||
mv "Makefile without client.am" Makefile.am
|
mv "Makefile without client.am" Makefile.am
|
||||||
mv "configure without client.ac" configure.ac
|
mv "configure without client.ac" configure.ac
|
||||||
rm client/Makefile.am
|
rm client/Makefile.am
|
||||||
echo "SUBDIRS = StupidAI" > AI/Makefile.am
|
echo "SUBDIRS = StupidAI" > AI/Makefile.am
|
||||||
rm -rf AI/EmptyAI
|
rm -rf AI/EmptyAI
|
||||||
rm -rf AI/GeniusAI
|
rm -rf AI/GeniusAI
|
||||||
find . -name ".svn" -exec rm -rf {} \;
|
#find . -name ".svn" -exec rm -rf {} \;
|
||||||
elif [ "$2" = "full" ]; then
|
elif [ "$2" = "full" ]; then
|
||||||
mv "Makefile with client.am" Makefile.am
|
mv "Makefile with client.am" Makefile.am
|
||||||
mv "configure with client.ac" configure.ac
|
mv "configure with client.ac" configure.ac
|
||||||
else
|
else
|
||||||
incusage
|
incusage
|
||||||
fi
|
fi
|
||||||
autoreconf -i
|
autoreconf -f
|
||||||
errorcheck "autoreconf -i"
|
errorcheck "autoreconf -f"
|
||||||
cd ..
|
cd ..
|
||||||
vcmi/configure --datadir=`pwd` --bindir=`pwd`vcmi --libdir=`pwd`
|
vcmi/configure --datadir=`pwd` --bindir=`pwd`vcmi --libdir=`pwd`
|
||||||
errorcheck "configure"
|
errorcheck "configure"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user