Pass only valptr_t to fuelcen_delete

This commit is contained in:
Kp 2015-07-12 01:04:18 +00:00
parent 1248f9a474
commit aa890e5d29
2 changed files with 4 additions and 3 deletions

View file

@ -63,7 +63,7 @@ void fuelcen_create( vsegptridx_t segp);
// a segment is loaded from disk.
void fuelcen_activate( vsegptridx_t segp, int station_type );
// Deletes a segment as a fuel center.
void fuelcen_delete( vsegptridx_t segp );
void fuelcen_delete(vsegptr_t segp);
// Charges all fuel centers to max capacity.
void fuelcen_replentish_all();

View file

@ -248,14 +248,15 @@ void trigger_matcen(const vsegptridx_t segnum)
//------------------------------------------------------------
// Takes away a segment's fuel center properties.
// Deletes the segment point entry in the FuelCenter list.
void fuelcen_delete( const vsegptridx_t segp )
void fuelcen_delete(const vsegptr_t segp)
{
Restart: ;
segp->special = 0;
for (uint_fast32_t i = 0; i < Num_fuelcenters; i++ ) {
FuelCenter &fi = Station[i];
if (fi.segnum == segp) {
if (vsegptr(fi.segnum) == segp)
{
// If Robot maker is deleted, fix Segments and RobotCenters.
if (fi.Type == SEGMENT_IS_ROBOTMAKER) {