mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r12616) -Codechange: r12591 didn't work as expected for NDS, move one function back to cpp
This commit is contained in:
parent
f1cd7ef5ee
commit
42a66ef990
|
@ -668,3 +668,14 @@ callb_err:
|
|||
ClearStorageChanges(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
CommandCost CommandCost::AddCost(CommandCost ret)
|
||||
{
|
||||
this->AddCost(ret.cost);
|
||||
if (this->success && !ret.success) {
|
||||
this->message = ret.message;
|
||||
this->success = false;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
|
|
@ -49,15 +49,7 @@ public:
|
|||
* @param ret the command to add the cost of.
|
||||
* @return this class.
|
||||
*/
|
||||
CommandCost AddCost(CommandCost ret)
|
||||
{
|
||||
this->AddCost(ret.cost);
|
||||
if (this->success && !ret.success) {
|
||||
this->message = ret.message;
|
||||
this->success = false;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
CommandCost AddCost(CommandCost ret);
|
||||
|
||||
/**
|
||||
* Adds the given cost to the cost of the command.
|
||||
|
|
Loading…
Reference in New Issue