Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Desynch on loading truck into cyborg transport when clients are set to different languages #3196

Closed
wzdev-ci opened this issue Feb 21, 2012 · 11 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_bug | by Cyp


Steps to reproduce:

  • Set one client to english, another client to something else.
  • Try to put a truck or tank on a cyborg transport.
  • All clients set to english (not just the player with the transport) get a "We can't do that! We must be a Cyborg unit to use a Cyborg Transport!" message in the console. (Which is a bit spammy, especially for the players that aren't using the cyborg transport.)
  • All clients not set to english see the truck or tank move onto the transport, without getting any spammy messages.
  • Desynch. Desynch logs show that english clients get the droid order set to DORDER_NONE, and get a actionDroid(psDroid, DACTION_NONE) call.

Suspected cause:
order.cpp

			if (!strcmp("Cyborg Transport", temp->aName) && !cyborgDroid(psDroid))
			{
				// NOTE: since we only have one type of transport (DROID_TRANSPORT), it isn't worth changing tons of code
				// to have two types available (DROID_TRANSPORT_SUPER), so we just check the name which can never be
				// renamed anyway, so we should be safe with this kludge.
				psDroid->order = DroidOrder(DORDER_NONE);
				actionDroid(psDroid, DACTION_NONE);
				audio_PlayTrack( ID_SOUND_BUILD_FAIL );
				addConsoleMessage(_("We can't do that! We must be a Cyborg unit to use a Cyborg Transport!"), DEFAULT_JUSTIFY, selectedPlayer);
			}

Thoughts:
Is DROID::aName the same on all clients, or is it locale-dependent? Changing »strcmp("Cyborg Transport", temp->aName)« to »strcmp("Cyborg Traasdfnsport", temp->aName)« allows adding trucks to cyborg transports.

Notes:
Probably not fixed in 3.1_beta4...


Issue migrated from trac:3196 at 2022-04-16 08:56:33 -0700

@wzdev-ci
Copy link
Contributor Author

vexed commented


Hmm, then, Houston we have a problem.

None of the translations should be touching that.

	/// UTF-8 name of the droid. This is generated from the droid template and cannot be changed by the game player after creation.
	char            aName[MAX_STR_LENGTH];

That is reserved for that purpose, or at least was.

@wzdev-ci
Copy link
Contributor Author

cybersphinx commented


Why doesn't this use "R-Cyborg-Transport" instead of the name?

@wzdev-ci
Copy link
Contributor Author

vexed commented


Found a old patch that I had, needs to be tested on a linux box to see if it will compile OK.

(note, stats are not touched yet)

@wzdev-ci
Copy link
Contributor Author

vexed uploaded file 0001-Create-new-droid-type-DROID_SUPERTRANSPORTER.patch (88.9 KiB)

@wzdev-ci
Copy link
Contributor Author

vexed commented


After some more toying around with the other way of handling this, I think making a new type is the safer bet in the long run.

I'll push this sometime tomorrow unless someone complains loudly.

@wzdev-ci
Copy link
Contributor Author

vexed changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

vexed changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

vexed commented


Create new droid type, DROID_SUPERTRANSPORTER.
fixes #3196

@wzdev-ci
Copy link
Contributor Author

vexed commented


Create new droid type, DROID_SUPERTRANSPORTER.
fixes #3196

2 similar comments
@wzdev-ci
Copy link
Contributor Author

vexed commented


Create new droid type, DROID_SUPERTRANSPORTER.
fixes #3196

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 4, 2012

vexed commented


Create new droid type, DROID_SUPERTRANSPORTER.
fixes #3196

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant