state(CLOSED),
target_sector(),
target_spawnpoint(),
+ script(),
sprite(),
stay_open_timer()
{
state(CLOSED),
target_sector(),
target_spawnpoint(),
+ script(),
sprite(),
stay_open_timer()
{
if (player) {
state = CLOSING;
sprite->set_action("closing", 1);
- if(script != "") {
+ if(!script.empty()) {
std::istringstream stream(script);
Sector::current()->run_script(stream, "Door");
}
- if(target_sector != "") {
+ if(!target_sector.empty()) {
GameSession::current()->respawn(target_sector, target_spawnpoint);
}
}