Casawir
-
Posts
51 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Casawir
-
-
"c++11" code, a little bit optimised maybe someone will be interested;
void CPythonPlayer::PickCloseItemVector() { CInstanceBase * pkInstMain = NEW_GetMainActorPtr(); if (!pkInstMain) return; TPixelPosition kPPosMain; pkInstMain->NEW_GetPixelPosition(&kPPosMain); CPythonItem& rkItem = CPythonItem::Instance(); std::vector<DWORD> itemlist{ rkItem.GetCloseItemVector(pkInstMain->GetNameString(), kPPosMain)}; if (itemlist.empty()) return; for (auto &i : itemlist) SendClickItemVectorPacket(i); }
std::vector<DWORD> CPythonItem::GetCloseItemVector(const std::string & myName, const TPixelPosition & c_rPixelPosition) { DWORD dwCloseItemDistance = 1000 * 1000; std::vector<DWORD> itemlist; for (auto &i : m_GroundItemInstanceMap) { TGroundItemInstance * pInstance = i.second; DWORD dwxDistance = DWORD(c_rPixelPosition.x - pInstance->v3EndPosition.x); DWORD dwyDistance = DWORD(c_rPixelPosition.y - (-pInstance->v3EndPosition.y)); DWORD dwDistance = DWORD(dwxDistance*dwxDistance + dwyDistance * dwyDistance); if (dwDistance < dwCloseItemDistance && (pInstance->stOwnership == "" || pInstance->stOwnership == myName)) { itemlist.push_back(i.first); } } return itemlist; // moving vector not explicit }
void CPythonPlayer::SendClickItemVectorPacket(DWORD dwIID) { if (IsObserverMode()) return; CPythonNetworkStream& rkNetStream = CPythonNetworkStream::Instance(); rkNetStream.SendItemPickUpPacket(dwIID); }
- 1
- 9
-
2 server attr doesnt match with client side map
-
Addl aplha channel to you texture , do it properly u can see how.to make.it good, opening official armor textures in photoshop or.gimp
- 1
-
He sold this for you he will fix it, if not make sure that noone will make deals with him again.
- 1
-
How can i convert c++ map to python dictionary, for example
std::map<std::string, int> mymap; mymap["key1"] = 50; mymap["key2"] = 20; mymap["key3"] = 100;
i want to reclaim in python,
self.mydictionary["key1"] = 50; self.mydictionary["key2"] = 20; self.mydictionary["key3"] = 100;
Is this possible with metin2 included libraries?
In worst case i would like to reclaim array as a list, not only get by loop.
-
Hi how can i send vector with elements contained, to client using packets?
-
Hi, i have got a problem, when i make alpha channel in my dds texture then my model is transparent in places where alpha channel is maximally black, any solution?
-
Hi could someone send me their function
item_select_cell
beacouse mine is choosing 0
-
ccache also does some weird things on my VM. When I'm doing small changes, ccache will just ignore them (maybe because it thinks the files are unchanged or something). Even after cleaning, I was not able to compile a gamefile with changes. Only after waiting for a while or disabling ccache at compilation, the new gamefile worked as intended
Also you'd note that people will have to change the Makefile, otherwise the source won't be compiled with ccache as far as I know, especially not if you're doing things like:
CC = gcc49
Instead, if you want to use ccache then, just use:
CC = ccache gcc49
With this changes i wrote in tutorial u dont need to change Makefile, but im not sure it might be depended on FreeBSD version. Maybe your problem with small changes is caused of not clearing,deleting .o files before compilation,
-
It had some problems back then but you have an issue there
/usr/local/bin/ccache -M 512 => 512 GB!/usr/local/bin/ccache -M 512M => 512 MBAhh ofc my mistake, your right.
-
Careful with clang and ccache might not work properly just a warning from my side
What do you mean ? Share with us
-
Install ccache
# cd /usr/ports/devel/ccache && make install clean
or# pkg_add -r ccache
THEN:# ee /etc/make.conf
PASTE IN THIS:.if !defined(NO_CCACHE) CC= /usr/local/libexec/ccache/world-cc CXX= /usr/local/libexec/ccache/world-c++ .endif .if ${.CURDIR:M*/ports/devel/ccache} NO_CCACHE= yes .endif
SAVE AND CLOSE.THEN:# ee /.cshrc
PASTE IN THIS:
# set ccache varibles setenv PATH /usr/local/libexec/ccache:$PATH setenv CCACHE_PATH /usr/bin:/usr/local/bin setenv CCACHE_DIR /var/tmp/ccache setenv CCACHE_LOGFILE /var/log/ccache.log # set ccache temp size to 512MB (default 1GB) if ( -x /usr/local/bin/ccache ) then /usr/local/bin/ccache -M 512M > /dev/null endif
SAVE AND CLOSE.THEN:# source /.cshrc
RESTART MAY BE REQUIRED
With this command we can check usage of memory:# ccache -s
MANUAL
https://ccache.samba.org/manual.html
- 1
-
float time_calc = (time*pkVictim->GetPoint(POINT_IMMUNE_STUN))/100;
pkVictim->ChatPacket(CHAT_TYPE_PARTY, "%f, %d", time_calc, pkVictim->GetPoint(POINT_IMMUNE_STUN));
For example:
time = 4 - int
POINT_IMMUNE_STUN = 90 - int
so technically i should get on chat this one:
3.60000 , 90
but instead of this im getting:
3.00000 , 90
any solution? Im newbie in cpp
-
That's because you are mixing libraries.
If you try to include PythonPlayer into an Gamelib file, it going to try to include all that's relevant to UserInterface (this has nothing to do with a circular reference). The problem is that even if you do include all the dependencies required for PythonPlayer to work, they are most likely going to conflict (on link time) with the ones on GameLib, because similar data and files are defined in each lib, plus extracting what's relevant from the stdafx.h is not fun either - each lib has their own stdafx and you can obviously not call both.
TL;DR: You are not going to be able to do what you are trying to do the way you are trying to do it, and even if you somehow managed, you shouldn't mix the two libraries anyway.
Yea thank u, I fixed this another way.
-
Well im not good as tutorial maker, but u can ask for whatever u want and i will explain as good.as i can
-
I want to change this part of code: to check if player got immune_fall - bonus( beacouse it doesnt work, maybe u got better solution to fix that bonus ? )
To do that thing i need to call function from PythonPlayer, but i cannot include header file because i get these errors:1>d:serwersourcemainline_releaseduserinterfaceAbstractPlayer.h(42): error C2061: syntax error : identifier 'TItemPos' 1>d:serwersourcemainline_releaseduserinterfacePacket.h(608): error C2065: 'CHARACTER_NAME_MAX_LEN' : undeclared identifier 1>d:serwersourcemainline_releaseduserinterfacePacket.h(608): warning C4200: nonstandard extension used : zero-sized array in struct/union 1> Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array 1>d:serwersourcemainline_releaseduserinterfacePacket.h(615): error C2065: 'CHARACTER_NAME_MAX_LEN' : undeclared identifier 1>d:serwersourcemainline_releaseduserinterfacePacket.h(615): warning C4200: nonstandard extension used : zero-sized array in struct/union 1> Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array 1>d:serwersourcemainline_releaseduserinterfacePacket.h(632): error C2146: syntax error : missing ';' before identifier 'pos' 1>d:serwersourcemainline_releaseduserinterfacePacket.h(632): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:serwersourcemainline_releaseduserinterfacePacket.h(1785): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:serwersourcemainline_releaseduserinterfacePacket.h(1787): error C2065: 'ITEM_SOCKET_SLOT_MAX_NUM' : undeclared identifier 1>d:serwersourcemainline_releaseduserinterfacePacket.h(1788): error C2146: syntax error : missing ';' before identifier 'aAttr'
and so on
-
Without including it you aren't able to call the function of another file.
Why don't you want to include it?
I get error, propably caused by circural dependency. I mean when i include PythonPlayer.h in ActorInstanceSync.cpp im getting weird errors
-
Hi, is this possible to get function from another header file without inluding it, so i can avoid circural dependency.
-
Hi, is this possible to get function from another header file without inluding it, so i can avoid circural dependency.
-
Hi does anyone had/solved problem with crashing core after creating party? My problem is: when i create party after about 5 seconds my core crashes and im not sure if its just my editions or there was problem with dat. Im using mainline_released
-
solved, if someone will have the same problem after changing python version, if nothing works just try removing last character ( replacing doesnt work)
[:-1]
- 1
-
As in topic for example:
ida = self.idEditLine.GetText() pwd = self.pwdEditLine.GetText() f = open("IOPS/saved_accounts/account" + str(id) + ".cfg", "w") f.write (ida +"n") f.write (pwd) f.close() login = linecache.getline("IOPS/saved_accounts/account" + str(id) + ".cfg", 1) password = linecache.getline("IOPS/saved_accounts/account" + str(id) + ".cfg", 2) login.strip() password.strip() self.PopupNotifyMessage(password+login+password)
we get message with spaces between.
- 1
-
0302 20:16:06292 :: CPythonSkill::RegisterSkillTable(locale/pl/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:158 Line:56]0302 20:16:06292 :: CPythonSkill::RegisterSkillTable(locale/pl/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:159 Line:57]0302 20:16:06293 :: CPythonSkill::RegisterSkillTable(locale/pl/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:160 Line:58]0302 20:16:06293 :: CPythonSkill::RegisterSkillTable(locale/pl/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:161 Line:59]0302 20:16:06293 :: CPythonSkill::RegisterSkillTable(locale/pl/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:162 Line:60]0302 20:16:06293 :: CPythonSkill::RegisterSkillTable(locale/pl/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:256 Line:61]0302 20:16:06293 :: CPythonSkill::RegisterSkillTable(locale/pl/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:257 Line:62]0302 20:16:06293 :: CPythonSkill::RegisterSkillTable(locale/pl/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:258 Line:63]0302 20:16:06293 :: CPythonSkill::RegisterSkillTable(locale/pl/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:259 Line:64]0302 20:16:06293 :: CPythonSkill::RegisterSkillTable(locale/pl/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:260 Line:65]0302 20:16:06294 :: CPythonSkill::RegisterSkillTable(locale/pl/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:261 Line:66]0302 20:16:06294 :: CPythonSkill::RegisterSkillTable(locale/pl/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:262 Line:67]0302 20:16:06294 :: CPythonSkill::RegisterSkillTable(locale/pl/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:6 Line:77]0302 20:16:06294 :: CPythonSkill::RegisterSkillTable(locale/pl/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:21 Line:78]replace skilldescskilltable.txtand for other error.. check your pcpc2effect maybe replace with other
well i get, That these errors are useless shit, and doesnt matter. Something else must be wrong beacouse in relase mode errors dont appear client just crashes. But i will try that one with skilltable cos i forgot that error xD
-
@refresh
This is the syserr - short version ofc; I Can't work out whats up ;x0303 15:09:05838 :: CResourceManager::GetResourcePointer: File not exist d:/ymir work/item/weapon/05120.gr2 0303 15:09:05840 :: CResourceManager::GetResourcePointer: File not exist d:/ymir work/item/weapon/05170.gr2 0303 15:09:05920 :: Polska Wersja(#2 ) cannot find icon file. setting to default. 0303 15:09:05929 :: Tarcza Ocalenia+0(#13070) cannot find icon file. setting to default. 0303 15:09:05929 :: Tarcza Ocalenia+1(#13071) cannot find icon file. setting to default. 0303 15:09:06581 :: CANNOT_FIND_PACK_FILE [sound/effect/etc/dust/dust.mss] 0303 15:09:06584 :: CANNOT_FIND_PACK_FILE [sound/effect/etc/dust/running_dust.mss] 0303 15:09:06596 :: CANNOT_FIND_PACK_FILE [sound/effect/etc/recuperation/drugup_red.mss] 0303 15:09:06601 :: CANNOT_FIND_PACK_FILE [sound/effect/etc/recuperation/drugup_blue.mss]
Hide weapon while emotion is acting
in Community Support - Questions & Answers
Posted
yes i did, but im not proud of my solution, and its not that short, u need to think about many cases what triggers and what can stop emotion
ill post it later but its not quality code