Network compatibility query March 18, 2010, 10:16:33 am I am trying to work on making the automatic convoy replacer in Simutrans-Experimental network compatible. In former verseions of Experimental, the convoy replacer has used a vector of vehicles and a few bool flags in convoi_t object itself, but I am moving the system over to using a new cl****. replace_data_t, in order to save memory when the convoy replacing is not being used (storing just a single null pointer in that case rather than an empty vector and a large number of bool flags). However, to make it network compatible, I have to p**** more than a pointer from simwerkz.cc, since the pointers will, of course, point to different memory locations on different machines. How do I best propogate a new replace_data_t cl**** amongst convoys from a GIUI window? I imagine that it would be something similar to the position in respect of schedules/lines - is that right? Also, to copy from one convoy to another, I have to use, I imagine, call_convoi_tool to p**** the ID of the convoy from which the object needs to be copied to the convoy to which the object needs to be copied; how best to modifiy call_convoi_tool to take an additional parameter being an additional convoy ID? I tried last night, and it didn't work properly?I should be very grateful for any ****istance with the tricky network compatibility complexities! Quote Selected
Re: Network compatibility query Reply #1 – March 18, 2010, 10:18:31 am Why not use a procedure similar to the transferring of the schedule's: printf/scanf everything to/from the extra parameter. Quote Selected
Re: Network compatibility query Reply #2 – March 18, 2010, 02:30:14 pm That's what I wad thinking, but I haven't delved into that code in detail - how does it work, in outline? How best to implement it? Quote Selected
Re: Network compatibility query Reply #3 – March 18, 2010, 02:43:39 pm Jsut look in bool wkz_change_convoi_t::init( karte_t *welt, spieler_t *sp ) case 'g'.There fpl->sscanf_schedule( p ); appears.The printf is somewhere else. You should figure this out youself Quote Selected