((CGameControllerMymod *)pSelf->GameServer()->m_pController)->myfunc();
I created a gamecontroller with some custom function and then from gamecontroller.cpp i call this boi and even tho i never created an instance of CGameControllerMymod since my sv_gametype is dm myfunc() is still run?!#include "stdio.h"
class IGameController
{
};
class CDefaultGameController : public IGameController
{
};
class CCustomGameController : public IGameController
{
public:
void custom() { puts("foo"); }
};
int main()
{
IGameController *pController = new CDefaultGameController();
((CCustomGameController *)pController)->custom();
return 0;
}
it prints "foo" just fine? :D no warnings nothing xd$ g++ cast.cpp
$ clang cast.cpp
/usr/bin/ld: /tmp/cast-2d52b0.o: in function `main':
cast.cpp:(.text+0x15): undefined reference to `operator new(unsigned long)'
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
$ clang++ -fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer cast.cpp
$ ./cast
foo
$ UBSAN_OPTIONS=log_path=./SAN:print_stacktrace=1:halt_on_errors=0 ASAN_OPTIONS=log_path=./SAN:print_stacktrace=1:check_initialization_order=1:detect_leaks=1:halt_on_errors=0 ./cast
foo
like this?1. - (1. - alpha)^2.2
does the job.
when I sample the color for the quad from the texture, it appears that I only have to convert the alpha, not the rgb values.
from experimenting it seemed like I then just need to multiply those colors together, however, that doesn't work yet.
before I dive deeper into more experimenting, do you happen to know the magic formulars for the colors? ^^1. - (1. - alpha)^2.2
does the job.
when I sample the color for the quad from the texture, it appears that I only have to convert the alpha, not the rgb values.
from experimenting it seemed like I then just need to multiply those colors together, however, that doesn't work yet.
before I dive deeper into more experimenting, do you happen to know the magic formulars for the colors? ^^ FindFormat.format == VK_FORMAT_B8G8R8A8_UNORM && FindFormat.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
and VK_FORMAT_R8G8B8A8_UNORM
for the textures$ echo status > *.fifo
$ grep "dnsbl=white" *.log|sed -e "s/.*client=\([^ ]*\) .*/\1/" | sort | uniq -c | sort -n
1 0.7:15050
1 13022
1 14001
1 15032
1 15054
1 15060
1 15070
2 10034
2 15011
2 15012
2 15062
2 15080
3 15040
4 15024
4 15090
5 0.7:-1
5 15013
13 15081
173 15091
$ echo status > *.fifo
$ grep "dnsbl=white" *.log|sed -e "s/.*client=\([^ ]*\) .*/\1/" | sort | uniq -c | sort -n
1 0.7:15050
1 13022
1 14001
1 15032
1 15054
1 15060
1 15070
2 10034
2 15011
2 15012
2 15062
2 15080
3 15040
4 15024
4 15090
5 0.7:-1
5 15013
13 15081
173 15091
1 11080
1 12001
1 12060
1 13002
1 13565
1 14001
1 902
2 0.7:15050
2 10034
2 12091
2 13001
2 13097
2 14071
2 15023
3 12092
3 13022
3 14010
3 15011
3 15025
3 15444
4 15012
5 20000
6 14051
6 15024
6 15032
6 15060
8 15040
10 14032
11 15013
16 15005
23 15062
23 15090
24 15054
51 0.7:-1
58 15070
61 15080
111 15081
3874 15091
(GameServer()->m_apPlayers[i]->m_ShowOthers == 2)
(edited) 1 11080
1 12001
1 12060
1 13002
1 13565
1 14001
1 902
2 0.7:15050
2 10034
2 12091
2 13001
2 13097
2 14071
2 15023
3 12092
3 13022
3 14010
3 15011
3 15025
3 15444
4 15012
5 20000
6 14051
6 15024
6 15032
6 15060
8 15040
10 14032
11 15013
16 15005
23 15062
23 15090
24 15054
51 0.7:-1
58 15070
61 15080
111 15081
3874 15091
src/game/gamecore.h
is the best place for the enum, but I think it fits in well.
A question about this, maybe one can answer me without much research. It is about the technical part. Why does /showothers
only affect dummy or player but cl_show_others
affects both.