Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
alicealys committed Aug 25, 2024
2 parents 53b6411 + 6651958 commit 2aa0aa3
Show file tree
Hide file tree
Showing 15 changed files with 110 additions and 23 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![license](https://img.shields.io/github/license/fedddddd/h2-mod.svg)
[![open bugs](https://img.shields.io/github/issues/fedddddd/h2-mod/bug?label=bugs)](https://github.com/fedddddd/h2-mod/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
[![Build](https://github.com/fedddddd/h2-mod/workflows/Build/badge.svg)](https://github.com/fedddddd/h2-mod/actions)
![license](https://img.shields.io/github/license/alicealys/h2-mod.svg)
[![open bugs](https://img.shields.io/github/issues/alicealys/h2-mod/bug?label=bugs)](https://github.com/alicealys/h2-mod/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
[![Build](https://github.com/alicealys/h2-mod/workflows/Build/badge.svg)](https://github.com/alicealys/h2-mod/actions)
[![Discord](https://img.shields.io/discord/955362057581129738?color=%237289DA&label=members&logo=discord&logoColor=%23FFFFFF)](https://discord.gg/dpnRn2tKT9)
[![Revolt](https://img.shields.io/badge/Revolt.chat-ff4655?style=for-the-badge&logo=Revolt.chat&logoColor=white)](https://rvlt.gg/24n6PDEw)

Expand Down Expand Up @@ -53,7 +53,7 @@ liable for misuse of the software. Use responsibly.

## Credits

This project is based on [IW6x](https://github.com/XLabsProject/iw6x-client) and [S1x](https://github.com/XLabsProject/s1x-client)
This project is based on [IW6x](https://git.alterware.dev/alterware/iw6-mod) and [S1x](https://git.alterware.dev/alterware/s1-mod)
* [momo5502](https://github.com/momo5502)
* [JariKCoding](https://github.com/JariKCoding/CoDLuaDecompiler)
* [xensik](https://github.com/xensik/gsc-tool/)
Expand Down
80 changes: 80 additions & 0 deletions data/cdata/scripts/names.gsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
main()
{
level.__pronouns__ = spawnstruct();
level.__pronouns__.pronouns_first = [];
level.__pronouns__.pronouns_second = [];

add_first_pronouns("she");
add_first_pronouns("they");
add_first_pronouns("it");
add_first_pronouns("he");

add_second_pronouns("her");
add_second_pronouns("them");
add_second_pronouns("its");
add_second_pronouns("him");

replacefunc(maps\_names::get_name, ::get_name);
}

add_first_pronouns(text)
{
level.__pronouns__.pronouns_first[level.__pronouns__.pronouns_first.size] = text;
}

add_second_pronouns(text)
{
level.__pronouns__.pronouns_second[level.__pronouns__.pronouns_second.size] = text;
}

get_random_pronouns()
{
combined = randomintrange(0, 2) == 1;

index_first = randomintrange(0, level.__pronouns__.pronouns_first.size);

pronouns_first = level.__pronouns__.pronouns_first[index_first];
pronouns_second = level.__pronouns__.pronouns_second[index_first];

if (combined)
{
index_second = index_first;
while (index_second == index_first)
{
index_second = randomintrange(0, level.__pronouns__.pronouns_first.size);
}

pronouns_second = level.__pronouns__.pronouns_first[index_second];
}

return pronouns_first + "/" + pronouns_second;
}

get_name(var_0)
{
pronouns = " (" + get_random_pronouns() + ")";

if ( isdefined( self.team ) && self.team == "neutral" )
return;

if ( !isdefined( var_0 ) && level.script == "credits" )
{
self.airank = "private";
return;
}

if ( isdefined( self.script_friendname ) )
{
if ( self.script_friendname == "none" )
return;

self.name = self.script_friendname + pronouns;
maps\_names::getrankfromname( self.name );
self notify( "set name and rank" );
return;
}

maps\_names::get_name_for_nationality( self.voice );
self.name = self.name + pronouns;
self notify( "set name and rank" );
}
1 change: 0 additions & 1 deletion data/cdata/ui_scripts/branding/credits.lua
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ LUI.MenuBuilder.registerType("credits_menu", function(f6_arg0, f6_arg1)
luiglobals.GenericMenuDims.OptionMenuWidth = optionmenuwidth + extrawidth

addlinkinfo(menu, "MENU_SYSINFO_CUSTOMER_SUPPORT_LINK", "MENU_SYSINFO_CUSTOMER_SUPPORT_URL", "github")
addlinkinfo(menu, "MENU_SYSINFO_DONATION_LINK", "MENU_SYSINFO_DONATION_URL", "donate")

addcredits(menu)

Expand Down
4 changes: 2 additions & 2 deletions data/zonetool/localizedstrings/english.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
"MENU_MUSIC_VOLUME_BOOST_DESC": "Move the slider to adjust the boost of the music volume.",

"MENU_SYSINFO_CUSTOMER_SUPPORT_LINK": "Github Page:",
"MENU_SYSINFO_CUSTOMER_SUPPORT_URL": "https://github.com/fedddddd/h2-mod",
"MENU_SYSINFO_CUSTOMER_SUPPORT_URL": "https://github.com/alicealys/h2-mod",
"MENU_SYSINFO_DONATION_LINK": "Donation link:",
"MENU_SYSINFO_DONATION_URL": "https://paypal.me/fedecek",
"MENU_SYSINFO_DONATION_URL": "https://github.com/alicealys/h2-mod",

"MENU_ENGLISH": "English",
"MENU_FRENCH": "Français",
Expand Down
2 changes: 1 addition & 1 deletion deps/libtomcrypt
Submodule libtomcrypt updated 379 files
2 changes: 1 addition & 1 deletion deps/rapidjson
7 changes: 6 additions & 1 deletion src/client/component/command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,12 @@ namespace command
const auto wp = game::G_GetWeaponForName(arg.data());
if (wp)
{
if (game::G_GivePlayerWeapon(ps, wp, 0, 0, 0, 0))
const auto def = game::weapon_defs[wp];

const auto want_dual_wield = std::atoi(params.get(2));
const auto dual_wield = !def->noDualWield && want_dual_wield;

if (game::G_GivePlayerWeapon(ps, wp, dual_wield, 0, 0, 0))
{
game::G_InitializeAmmo(ps, wp, 0);
game::G_SelectWeapon(0, wp);
Expand Down
5 changes: 5 additions & 0 deletions src/client/component/game_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ namespace game_data

void initialize_players_folder()
{
if (!utils::io::directory_exists(PLAYERS_FOLDER))
{
return;
}

if (utils::io::directory_exists(H2_MOD_PLAYERS_FOLDER))
{
return;
Expand Down
4 changes: 2 additions & 2 deletions src/client/component/motd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ namespace motd
{
map =
{
{"github", "https://github.com/fedddddd/h2-mod"},
{"github", "https://github.com/alicealys/h2-mod"},
{"donate", "https://www.paypal.com/donate/?hosted_button_id=LM5BA9UABEV4Q"},
{"specops", "https://github.com/fedddddd/h2-specops-mod"},
{"specops", "https://github.com/alicealys/h2-specops-mod"},
{"credits_1", "https://github.com/momo5502"},
{"credits_2", "https://github.com/VladWinner"},
{"credits_3", "https://github.com/diamante0018"},
Expand Down
4 changes: 0 additions & 4 deletions src/client/component/updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#include <utils/string.hpp>
#include <utils/properties.hpp>

#define MASTER "https://master.fed0001.xyz/"

#define FILES_PATH "files.json"
#define FILES_PATH_DEV "files-dev.json"

Expand Down Expand Up @@ -292,8 +290,6 @@ namespace updater
static std::vector<std::string> server_urls =
{
{"https://h2-mod.alicent.cat/"},
{"https://h2-mod.fed.cat/"}, // remove this at some point
{"https://master.fed0001.xyz/"}, // remove this at some point
};

const auto try_url = [&](const std::string& base_url)
Expand Down
2 changes: 2 additions & 0 deletions src/client/game/symbols.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ namespace game
WEAK symbol<int> volmod_index{0x151BADFD8};
WEAK symbol<int> music_dsp_bus_index{0x151B9AA40};

WEAK symbol<WeaponDef*> weapon_defs{0x14CE01580};

namespace hks
{
WEAK symbol<lua_State*> lua_state{0x1419D83E8};
Expand Down
6 changes: 3 additions & 3 deletions src/client/resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "fed"
VALUE "CompanyName", "h2-mod"
VALUE "FileDescription", "H2-Mod"
VALUE "FileVersion", VERSION_FILE
VALUE "InternalName", "H2-Mod"
VALUE "LegalCopyright", "Copyright (C) 2021 fed. All rights reserved."
VALUE "LegalCopyright", "Copyright (C) 2024 h2-mod. All rights reserved."
VALUE "Licence", "GPLv3"
VALUE "Info", "https://github.com/fedddddd/h2-mod"
VALUE "Info", "https://github.com/alicealys/h2-mod"
VALUE "OriginalFilename", "h2-mod.exe"
VALUE "ProductName", "h2-mod"
VALUE "ProductVersion", VERSION_PRODUCT
Expand Down
4 changes: 2 additions & 2 deletions src/client/resources/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -499,12 +499,12 @@ <h2>No settings yet!</h2>
<div style="text-align: center; width: 100%;">
<h1>H2-Mod</h1>
<p style="margin-top: 7vh; margin-bottom: 7vh;"><a
onClick="window.external.openUrl('https://github.com/fedddddd/h2-mod');">GitHub
onClick="window.external.openUrl('https://github.com/alicealys/h2-mod');">GitHub
Page</a></p>
<p>Developers
<div class="row">
<div class="column">
<p><a onClick="window.external.openUrl('https://github.com/fedddddd');">fed</a></p>
<p><a onClick="window.external.openUrl('https://github.com/alicealys');">fed</a></p>
</div>
<div class="column">
<p><a onClick="window.external.openUrl('https://github.com/VladWinner');">Vlad</a>
Expand Down
2 changes: 1 addition & 1 deletion src/common/utils/toast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace utils

instance->setAppName(L"H2-Mod");
instance->setAppUserModelId(
WinToastLib::WinToast::configureAUMI(L"fed", L"h2-mod", L"", L"20201212"));
WinToastLib::WinToast::configureAUMI(L"h2-mod", L"h2-mod", L"", L"20201212"));

WinToastLib::WinToast::WinToastError error;
success = instance->initialize(&error);
Expand Down

0 comments on commit 2aa0aa3

Please sign in to comment.