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

Positional audio support for Left 4 Dead 2 on Linux #2508

Merged
merged 1 commit into from Aug 11, 2016

Conversation

@davidebeatrici
Copy link
Member

commented Aug 10, 2016

No description provided.

// that can be found in the LICENSE file at the root of the
// Mumble source tree or at <https://www.mumble.info/LICENSE>.

#include "../mumble_plugin_linux_x86.h" // Include standard plugin header.

This comment has been minimized.

Copy link
@mkrautz

mkrautz Aug 10, 2016

Member

Remember to change this to the new name.

#include "../mumble_plugin_linux_x86.h" // Include standard plugin header.
#include "../mumble_plugin_utils.h" // Include plugin header for special functions, like "escape".

procptr32_t serverid_steamclient, player_server; // BYTE values to contain modules addresses

This comment has been minimized.

Copy link
@mkrautz

mkrautz Aug 10, 2016

Member

These are not BYTE values. Wrong comment?

// Char values for extra features
char serverid[22], host[22], servername[50], map[30], player[33];
// State
BYTE state;

This comment has been minimized.

Copy link
@mkrautz

mkrautz Aug 10, 2016

Member
unsigned char

procptr32_t steamclient = getModuleAddr("steamclient.so"); // Retrieve "steamclient.dll" module's memory address
// This prevents the plugin from linking to the game in case something goes wrong during module linking.
if (!steamclient)

This comment has been minimized.

Copy link
@mkrautz

mkrautz Aug 10, 2016

Member
if (steamclient == 0)

procptr32_t server = getModuleAddr("server.so"); // // Retrieve "engine.dll" module's memory address
// This prevents the plugin from linking to the game in case something goes wrong during module linking.
if (!server)

This comment has been minimized.

Copy link
@mkrautz

mkrautz Aug 10, 2016

Member
if (server == 0)
@@ -6,5 +6,15 @@
include(../plugins.pri)

TARGET = l4d2
SOURCES = l4d2.cpp
LIBS += -luser32

This comment has been minimized.

Copy link
@mkrautz

mkrautz Aug 11, 2016

Member

Can we please move the plugin to plugins/l4d2-linux instead? So, in its own directory, with its own .pro file.

This comment has been minimized.

Copy link
@mkrautz

mkrautz Aug 11, 2016

Member

Scratch that. We want to keep this in the same plugin.

SOURCES = l4d2-linux.cpp
LIBS += -lrt
}
}

This comment has been minimized.

Copy link
@mkrautz

mkrautz Aug 11, 2016

Member

Missing newline at the end of the file.


unix {
!macx {
SOURCES = l4d2-linux.cpp

This comment has been minimized.

Copy link
@mkrautz

mkrautz Aug 11, 2016

Member

l4d2_linux.cpp. We usually use "_$OS" when specifying an OS-specific .cpp file.

LIBS += -luser32
}

unix {

This comment has been minimized.

Copy link
@mkrautz

mkrautz Aug 11, 2016

Member

Instead of nested unix and mac, please use:

linux {.

unix {
!macx {
SOURCES = l4d2-linux.cpp
LIBS += -lrt

This comment has been minimized.

Copy link
@mkrautz

mkrautz Aug 11, 2016

Member

You shouldn't need -lrt for this. The link plugin needs it for shmem.

@mkrautz

This comment has been minimized.

Copy link
Member

commented Aug 11, 2016

Please squash! After that, LGTM.

return false;
}

procptr32_t steamclient = getModuleAddr("steamclient.so"); // Retrieve "steamclient.dll" module's memory address

This comment has been minimized.

Copy link
@mkrautz

mkrautz Aug 11, 2016

Member

Wrong comment.


serverid_steamclient = steamclient + 0x118E965; // Module + Server ID offset

procptr32_t server = getModuleAddr("server.so"); // // Retrieve "engine.dll" module's memory address

This comment has been minimized.

Copy link
@mkrautz

mkrautz Aug 11, 2016

Member

Wrong comment, and double //.

@mkrautz mkrautz merged commit 58a7ff5 into mumble-voip:master Aug 11, 2016

@davidebeatrici davidebeatrici deleted the davidebeatrici:l4d2-linux-plugin branch Aug 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.