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

Add support for a "give a" command to give player armour #136

Merged

Conversation

hemebond
Copy link
Contributor

@hemebond hemebond commented Mar 1, 2024

Allows the command give a # to give the player armour, just like the other give commands. Based on the example code provided by Baker7. Fixes #132 .

@hemebond
Copy link
Contributor Author

hemebond commented Mar 1, 2024

Tested in id1 and rogue

image

@ghost
Copy link

ghost commented Mar 3, 2024

Tested in id1 and rogue

image

Can you comment a link to download your darkplaces with the GIVE A command that I can use in the meantime until this pull request is merged?

@hemebond
Copy link
Contributor Author

hemebond commented Mar 4, 2024

Can you comment a link to download your darkplaces with the GIVE A command that I can use in the meantime until this pull request is merged?

I don't have any builds online, and can only build locally for Linux.

@ghost
Copy link

ghost commented Mar 4, 2024

Can you comment a link to download your darkplaces with the GIVE A command that I can use in the meantime until this pull request is merged?

I don't have any builds online, and can only build locally for Linux.

I understand. Thank you.

Copy link
Contributor

@bones-was-here bones-was-here left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately Baker7's patch from #132 is a Quake-specific hack and it's the same problem here: it assumes all SVQC programs use the fields armortype and items in the same way that id1 Quake or Rogue did. items might be OK (its already set by the give command for weapons) but armortype has never been set by DP or FTE engines. Not all games have 3 types, those that do don't necessarily identify them with 0.8 0.6 and 0.3 (unlike the items bits, those aren't declared in progsdefs). Some games might even use this as a bitfield (eg indicating the player has a helmet but not boots). I think you can only set armortype safely for GAME_NORMAL and GAME_ROGUE, and probably others whose armour is id1 compatible. Xonotic and Nexuiz only have one type, I don't know about other games.

Currently this func uses LH's code style (see CONTRIBUTING.md) so it would be best if you could stick to that please.

@bones-was-here bones-was-here merged commit f2b5d49 into DarkPlacesEngine:master Apr 21, 2024
1 check passed
@hemebond hemebond deleted the feature/give-armour-command branch April 21, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I want new "GIVE A" cheat command
2 participants