Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/base/racetrack.cc')
-rw-r--r--src/game/base/racetrack.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/game/base/racetrack.cc b/src/game/base/racetrack.cc
index 51526ea..67b8327 100644
--- a/src/game/base/racetrack.cc
+++ b/src/game/base/racetrack.cc
@@ -28,6 +28,8 @@ CheckPoint::CheckPoint(RaceTrack *parent)
} else {
die();
}
+
+ set_flag(core::Entity::NonSolid);
}
CheckPoint::~CheckPoint()
@@ -42,9 +44,11 @@ RaceTrack::RaceTrack() : EntityDynamic()
track_player = 0;
track_racestart = 0;
track_checkpointtime = 0;
+ entity_moduletypeid = race_enttype;
set_state(core::Entity::NoPower);
set_flag(core::Entity::Dockable);
+ set_flag(core::Entity::NonSolid);
}
RaceTrack::~RaceTrack()
@@ -57,7 +61,7 @@ void RaceTrack::add_checkpoint(CheckPoint *checkpoint)
track_checkpoints.push_back(checkpoint);
}
-void RaceTrack::reset()
+void RaceTrack::reset_race()
{
if (track_player) {
track_player->set_mission_target(0);
@@ -73,7 +77,7 @@ void RaceTrack::reset()
set_state(core::Entity::NoPower);
}
-void RaceTrack::dock(core::Entity *entity)
+void RaceTrack::func_dock(core::Entity *entity)
{
if (entity->moduletype() != ship_enttype)
@@ -123,12 +127,12 @@ void RaceTrack::frame(float seconds)
}
if (!player) {
- reset();
+ reset_race();
return;
}
if (!player->control() || (player->control()->zone() != zone())) {
- reset();
+ reset_race();
return;
}
@@ -137,7 +141,7 @@ void RaceTrack::frame(float seconds)
if (math::distance(location(), player->control()->location()) > radius()) {
std::string message("^BNo cheating!");
core::server()->broadcast(message);
- reset();
+ reset_race();
return;
}
@@ -172,7 +176,7 @@ void RaceTrack::frame(float seconds)
std::string message("^BToo slow, race lost!");
core::server()->broadcast(message);
- reset();
+ reset_race();
return;
}
@@ -205,7 +209,7 @@ void RaceTrack::frame(float seconds)
player->send(msgstr.str());
player->sound("game/buy");
- reset();
+ reset_race();
}
}
}