/** Think actions like any other structure would have. **/ void cAbstractStructure::think() { // AI if (iPlayer > 0) { aiplayer[iPlayer].think_repair_structure(this); } // Other think_damage(); think_repair(); // die when out of hp if (iHitPoints < 1) { die(); } }
//--------- Begin of function Firm::process_common_ai --------// // // AI processing functions common for all firm types. // void Firm::process_common_ai() { if( info.game_date%30==firm_recno%30 ) think_repair(); //------ think about closing this firm ------// if( !should_close_flag ) { if( ai_should_close() ) { should_close_flag = 1; nation_array[nation_recno]->firm_should_close_array[firm_id-1]++; } } }