\dll\
with \dlls\
and it should hopefully work gamedll_linux "dlls/hl.so"
gamedll_osx "dlls/hl.dylib"
with
gamedll_linux "../valve/dlls/hl.so"
gamedll_osx "../valve/dlls/hl.dylib"
should make your mod playable on Linux and MacOS.i pick d even though tripod isnt canon
I'm using the vanilla Spirit of Half-Life game librariesWhy?
Do I have to include the mods folderYou don't have to do anything. But you should include the mod folder with your mod, the same way you should give someone a cup if you are trying to give them a cup of tea. If you just pour it into the air you'll have tea on the floor and they'll have to find their own cup and try to fill it with the floor tea and that can't be fun, can it? What are you trying to make? I assume it's not floor tea?
hud_draw 0
to hide the colon, and once with hud_draw 1
to capture the kill feed. Then using a video editor, you can combine the bottom half of the first capture and the top half of the second capture. Does that make sense?If I see the image, what does that mean?That you are using a different browser or a browser with different settings than I. On Android, the image isn't displayed in Chrome v103 or Firefox Focus v102, but regular Firefox v102 displays the image (but with a security warning in the address bar - the red line over the lock icon). It's been a trend that the major browser vendors keep tightening the restrictions around unencrypted content and I believe Chrome is the strictest.
Do I need to get a SSL cert to enable HTTPS?If you are using a traditional web hosting service they can almost certainly take care of creating and renewing a cert for you (it's usually included for free these days though the rare small web host might charge you for it even though it almost doesn't cost them anything and is almost necessary these days). If not, or if you have your own server or are using a VPS, yes, you'll need a SSL/TLS cert, and you can get one for free from Let's Encrypt (it can be a little bit tricky to set up).
#include "cl_dll.h"
#include "com_model.h"
#include "r_studioint.h"
#include <array>
extern engine_studio_api_t IEngineStudio;
typedef std::array<unsigned char, 3> rgb_color;
// Converts hue (in degrees) to 8bpc linear RGB, with 100% saturation and brightness
constexpr rgb_color hueToRgb(int hue) {
rgb_color result{};
if (hue < 0 || hue >= 360) { // Out of range, make it red
hue = 0;
}
const int cycleProgress = hue % 120;
const int channelA = hue / 120;
const int channelB = (channelA + 1) % result.size();
if (cycleProgress < 60) {
// If hue is between 0 and 59 inclusive, channelA is 0. The result is between #FF0000 and #FFFA00 inclusive
// If hue is between 120 and 179 inclusive, channelA is 1. The result is between #00FF00 and #00FFFA inclusive
// If hue is between 240 and 299 inclusive, channelA is 2. The result is between #0000FF and #FA00FF inclusive
result[channelA] = 255;
result[channelB] = (unsigned char) ((cycleProgress * 255) / 60);
} else {
// If hue is between 60 and 119 inclusive, channelA is 0. The result is between #FFFF00 and #04FF00 inclusive
// If hue is between 180 and 239 inclusive, channelA is 1. The result is between #00FFFF and #0004FF inclusive
// If hue is between 300 and 359 inclusive, channelA is 2. The result is between #FF00FF and #FF0004 inclusive
result[channelA] = (unsigned char) (((120 - cycleProgress) * 255) / 60);
result[channelB] = 255;
}
return result;
}
rgb_color getPlayerTopColorRgb(int playerIndex) {
rgb_color result { 255, 255, 255 };
if (playerIndex >= 0 && playerIndex < gEngfuncs.GetMaxClients())
const player_info_t * const playerInfo = IEngineStudio.PlayerInfo(playerIndex);
if (playerInfo) {
const int topColorHue = playerInfo->topcolor;
result = hueToRgb(topColorHue);
}
}
return result;
}
rgb_color getLocalPlayerTopColorRgb() {
rgb_color result { 255, 255, 255 };
const cl_entity_t * const localPlayer = gEngfuncs.GetLocalPlayer();
if (localPlayer) {
const int playerEntityIndex = localPlayer->index;
const int playerIndex = playerEntityIndex - 1;
result = getPlayerTopColorRgb(playerIndex);
}
return result;
}