Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify that damage values match in a multi-game #86

Open
roncli opened this issue Jul 27, 2017 · 0 comments
Open

Verify that damage values match in a multi-game #86

roncli opened this issue Jul 27, 2017 · 0 comments

Comments

@roncli
Copy link
Collaborator

roncli commented Jul 27, 2017

Because the pre-retail-1.1 game files have different damage amounts than retail-1.1 and beyond (see Hyper fusion issue), it would be awesome if Retro would verify that the game files of a client match the game files of a host, to avoid issues that arise because someone unknowingly has the older files.

This could easily be done by ensuring that the values of Weapon_info[i].strength[j] match each other when connecting. Here's how to get those values:

for(int i = 0; i < MAX_WEAPON_TYPES; i++) {
	for (int j = 0; j < NDL; j++) {
		con_printf(CON_NORMAL, "Type: %d - Difficulty: %d - Value: %0.3f\n", i, j, f2fl(Weapon_info[i].strength[j]));
	}
}

The idea is that a client connecting to a host would send a packet containing all the data to the host, and if the data doesn't match the host's it doesn't allow the client to connect.

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

No branches or pull requests

1 participant