Hi, so i am trying to create a player controllable sentry as in tf2. It works pretty well. I modified turret.cpp a bit: created turret.h file, moved CBaseTurret declarations there and created a playerSentry.cpp file and created a new class inside. However, it gives me this error after building:
Error    LNK2005    "public: virtual bool __thiscall CBaseTurret::Save(class CSave &)" (?Save@CBaseTurret@@UAE_NAAVCSave@@@Z) already defined in playerSentry.obj    hldll    C:\Nk\halflife-updated-master\projects\vs2019\turret.obj    1
Error    LNK2005    "public: virtual bool __thiscall CBaseTurret::Restore(class CRestore &)" (?Restore@CBaseTurret@@UAE_NAAVCRestore@@@Z) already defined in playerSentry.obj    hldll    C:\Nk\halflife-updated-master\projects\vs2019\turret.obj    1
I keep seeing this error quite often, though. What is the deal here?

EDIT: Nevermind, fixed it. i accidentally copied a part of definition to turret.h and it messed up everything.