The online racing simulator
New Version 0.6T - More robust multiplayer system
(225 posts, started , go to first unread)
I can confirm that.
OK, I don't know why they are converted to read-only when they are copied from your download location into data\setup by LFS.

It's not something LFS is doing, at least not deliberately. I'm on Windows 7 and that doesn't happen on my computer.

LFS is using the CopyFile function.
https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-copyfile

From the documentation:
File attributes for the existing file are copied to the new file. For example, if an existing file has the FILE_ATTRIBUTE_READONLY file attribute, a copy created through a call to CopyFile will also have the FILE_ATTRIBUTE_READONLY file attribute. For more information, see Retrieving and Changing File Attributes.


I don't see any reason why it would change the attributes. Uhmm
For the record I'm also on W7.
Just tried another option - downloaded the setup normally and stored on desktop - doubleclicked to store in setups folder as file associations do - no read only atribute. I wonder if it has to do something with browser - using Firefox.

Edit: Opera doesn't even offer option to open the file directly.
OK - I've reproduced that too. When selecting "Open with Live for Speed" in Firefox's download dialog it is copied with read only attributes.

I wonder why that is. I suppose that temporary copy held by Firefox is read-only for some reason.

EDIT: I think it can be fixed by writing my own version of CopyFile. It would read the file and save a fresh copy of it with default attributes, disregarding the source file attributes. Only trouble is I don't want to get back into test patches now so it could be a long wait.
Well,it's not a huge issue,so I think it's enough to be added to to-do list. But at least you found the problem!
I'm running Firefox also. I checked the temp file stored by Firefox and it's marked read only. So it seems to be a problem with Firefox itself.
In IE there doesn't seem to have a problem directly running setups with LFS.

@Scawen -Thanks for replying.
Though it is interesting that the problem was noticed only after the new patch!
Guess it's related with the 0.6T, since it happened after i updated the game... But when the FPS or time are set to be shown on the left, nothing appear, but when it's set on the right, it's working. Any way to fix that?
Attached images
lfs_00000036.jpg
lfs_00000037.jpg
Quote from Sobis :Though it is interesting that the problem was noticed only after the new patch!

In 0.6R I did have my own code in there that did the job. But I just came across that CopyFile Windows function one day and thought it would be good to use it. I guess for no real reason than to save a few lines of code.

Just for interest:

For comparison, here's the old function:

int copy_file(ccs src, ccs dst)
{
FILE *fin = fopen(src, read_bin);
if (fin==NULL) return 0;

fseek(fin, 0, SEEK_END);
int size = ftell(fin);

if (size==-1)
{
fclose(fin);
return 0;
}

fseek(fin, 0, SEEK_SET);

byte *mem = new byte[size];
fread(mem, 1, size, fin);
fclose(fin);

FILE *fout = fopen(dst, write_bin);
if (fout==NULL)
{
delete [] mem;
return 0;
}

fwrite(mem, 1, size, fout);
fclose(fout);
delete [] mem;
return 1;
}

And here's the new one which is very compact but causes that issue:

int copy_file(ccs src, ccs dst)
{
return CopyFile(src, dst, FALSE);
}

Quote from Kova. :Guess it's related with the 0.6T, since it happened after i updated the game... But when the FPS or time are set to be shown on the left, nothing appear, but when it's set on the right, it's working. Any way to fix that?

I think you need to switch off the LFS logo. At the bottom of Options... Misc.

I think you have it set to be displayed, and that hides the FPS/Time but the logo is in turn hidden by the InSim buttons.
#86 - expr
Quote from Scawen :EDIT: I think it can be fixed by writing my own version of CopyFile. It would read the file and save a fresh copy of it with default attributes, disregarding the source file attributes. Only trouble is I don't want to get back into test patches now so it could be a long wait.

I don't think using CopyFile is such a bad idea itself, not that it really matters for small files like setups. Simply resetting the file attributes of the new file afterwards should still result in a nice and compact solution.
#87 - avih
Quote from Scawen : When selecting "Open with Live for Speed" in Firefox's download dialog it is copied with read only attributes.

There could be other scenarios, like if the setup is on a read-only media. In general, I'd think it should be considered an LFS issue, as it's LFS itself which imports the file and expects the result to be writable (apparently) but doesn't take steps to ensure it.
Quote from avih :There could be other scenarios, like if the setup is on a read-only media. In general, I'd think it should be considered an LFS issue, as it's LFS itself which imports the file and expects the result to be writable (apparently) but doesn't take steps to ensure it.

Agreed:

Quote from Scawen :I think it can be fixed by writing my own version of CopyFile. It would read the file and save a fresh copy of it with default attributes, disregarding the source file attributes. Only trouble is I don't want to get back into test patches now so it could be a long wait.

Perhaps resetting the read only bit like this wouldn't require a whole new round of test patches?


DWORD allowedBits = 0x31A7;
LPSTR pszFileName = "copied_file.dat";

DWORD attrs = GetFileAttributes(pszFileName);
if (attrs & FILE_ATTRIBUTE_READONLY) {
attrs &= ~FILE_ATTRIBUTE_READONLY & allowedBits;
SetFileAttributes(pszFileName, attrs);
}

Completely untested, used SetFileAttributes docs as reference. The "allowedBits" field is used to clear any extra bits that GetFileAttributes() may return but SetFileAttributes() cannot work with. MSDN does not seem to mention whether such bits would be ignored or cause SetFileAttributes() to fail.
Quote from MadCatX :Perhaps resetting the read only bit like this wouldn't require a whole new round of test patches?

It requires new version Smile
Quote from RC-Maus :It requires new version Smile

We have had bugfix versions released quickly without a test patch phase, 0.6T2 could carry such a fix...
I don't really have any difficulty thinking of a solution. I just don't want to release a test patch with this little update. It's on the list for the next patch but there is no time estimate for it.

By the way, I remembered why I changed to the new function. It wasn't actually to save the few lines of code with the convenient function. The main reason was that in the development version, I wanted a copy_file that preserved the file dates. The solution I'm happy with is to reinstate the old copy_file for the purpose of copying the downloaded files, but retain the new version for the development version purposes.
Quote from Scawen :...
A couple of weeks after the release of this full version, we plan to show some images of the new track updates Eric has been working on using the new graphics system which supports specular lighting and a new shadow system.

We are in the timeframe ! let the speculation begins !!! Will we have some images of a new track (Ya right) or updated old tracks ? (I would feel painful for Eric if he had to update manually hundreds of objects on 'old' tracks ... not that I think he would have 'Westhilled' the 4 remaining tracks anyway) or if we can see some Blackwood updates (there some crazy straights not available directly in the open config mode) ...
I mentioned in the first post of this thread that we planned to release images of the graphical updates this month. Since then we have been brushing up the existing updates to be ready to make some screenshots.

It has been a useful process as Eric visited the already updated tracks to fix remaining issues, while I got back into looking around the tracks and noticing things I could fix.

As we looked around with our thoughts on the screenshots, we noticed there are things I should work on to improve the screenshots. I will do some of those. So as it turns out our plan has changed a bit to release screenshots in August rather than July.

I wanted to tell you about that change of plan. Also I can say a a few more words about what we are doing and why.

The new shadow system requires an update of every track before we can release it. Some scenery objects were not built in a way that works properly with the shadow maps. For example, every building must have a roof so that shadows are cast correctly. Some of the tracks were built so long ago that they were never designed to be viewed from above. At that time there was no real Free View mode, so things like that were invisible. It's an opportunity to visit every track and bring them up to date, also making the roads and a lot of other scenery make use of the specular reflections, 3D kerbs, better scaled scenery, improvements on some corners and so on. There will not be a "full Westhill" job done on every track. Some tracks will change more than others. We need to remain focussed on getting the updates done, not letting the job expand out of hand, although it is fun doing so many updates. We look forward to showing you some screenshots in August.
i think i found out my problem now. or one of them atleast.

FOV for smoke. it over saturates the image so i get lag. it did in singleplayer mode today. so i guess its not about connection then. it can literally make my entire screen flicker almost.
not sure if i turned something else up to much maybe too then :/
but i have a original LFS with all org settings so can check via that.
player FOV i set that down a little too. gives my image a more calm image me thinks,compared to default value.
mostly happens if incar and behind someone who smokes.alot.and also in some replay cams it can do this.not sure how thats even possible but apparently its a issue i got.

but... it still does it when its turned down completely. so made me wonder if there is any known issues with smoke file or FOV in options.


EDIT: also seems forums is back up running.

Quote from Scawen :
I wanted to tell you about that change of plan. Also I can say a a few more words about what we are doing and why.

The new shadow system requires an update of every track before we can release it. Some scenery objects were not built in a way that works properly with the shadow maps. For example, every building must have a roof so that shadows are cast correctly. Some of the tracks were built so long ago that they were never designed to be viewed from above. At that time there was no real Free View mode, so things like that were invisible. It's an opportunity to visit every track and bring them up to date, also making the roads and a lot of other scenery make use of the specular reflections, 3D kerbs, better scaled scenery, improvements on some corners and so on. There will not be a "full Westhill" job done on every track. Some tracks will change more than others. We need to remain focussed on getting the updates done, not letting the job expand out of hand, although it is fun doing so many updates. We look forward to showing you some screenshots in August.

heh... i kinda had figured that out from going through all files. one thing is stuff like roofs and enviroment. when going through lfs files so much as i have lately. i was thinking some files are completely weird with the roofs. one is the one in fernbay . but also some of those in south city is pretty weird. i mean. a wall is also the water tower Big grin i hope Eric is on top with getting it fixed. because it would look sooo nice .even i wasted some time myself on files no longer in use. im still hooked on making new.take the time it needs.we be here and happy with anything new.or i will atleast . but car models ? wouldnt they have to be uhm.... dare i say it... upgraded aswell then ? (oops hit a nail) Smile

All in all i think it all sounds like a good solid progress we soon will see. i think it will be good Smile
Quote from THE WIZARD DK :... but car models ? wouldnt they have to be uhm.... dare i say it... upgraded aswell then ? (oops hit a nail) Smile

Cars could do with an update. Some of the cars are very old indeed. But they aren't causing any problems with shadows so there is no need for car updates to delay the release of the new graphics.
Quote from Scawen :Cars could do with an update. Some of the cars are very old indeed. But they aren't causing any problems with shadows so there is no need for car updates to delay the release of the new graphics.

true Smile but i meant "in time" as i wrote, take the time it needs Smile


what sound like rain in LFS ?
a RB4 crying because it wants to be updated Tongue

Quote from Victor :
Unfortunately that's not a quick solution, but one that can be realised if I can find some free time (or maybe it can be a community effort? I've no problems making it an open source project ... it'll be javascript anyway, so it's open by default Smile )

i think a "open source" community made could be great. i see many talented people here, who im sure could help out with making a new and maybe even better lfs remote. Thumbs up
Quote from Scawen :There will not be a "full Westhill" job done on every track.

I'm actually glad to hear this.

The changes you made to Westhill made the race track better, and arguably it was never really finished when you originally released it with S2. Some of the corners on the original track were in need of change when they were initially released and the changes Eric made in the most recent version are quite genius. But that said, changing any of the other track layouts too drastically now might not be smart because they are considered 'classic' tracks to many people. The visual updates and off-track features you added to Westhill would be a welcome sight if they were added to the current set of tracks, but I very much hope that there are not too many updates to the underlying track layouts that alter the flow too drastically.

Nevertheless, I am stoked to see what's new and just hope that we really will see the fruits of your labour in August.
Quote from Scawen :We look forward to showing you some screenshots in August.

no problem, we will still be there lurking around Tongue
Glad for you the things are going well with new ideas and challenges ! Freshing up some tracks sounds very promising !
Quote from mbutcher :...But that said, changing any of the other track layouts too drastically now might not be smart because they are considered 'classic' tracks to many people....

For me classics are meant to be changed : no problem with this Big grin
Let's imagine Fern Bay and Kyoto a bit more designed for some corners, it would not hurt !
Quote from Flotch :no problem, we will still be there lurking around Tongue
Glad for you the things are going well with new ideas and challenges ! Freshing up some tracks sounds very promising !

For me classics are meant to be changed : no problem with this Big grin
Let's imagine Fern Bay and Kyoto a bit more designed for some corners, it would not hurt !

i kinda get what MButcer means here. i for one "at times" ,sometime miss the old westhill forexample and blw.yesterday i was driving on aston long ,thinking..i drove this part of road for years. and it does remind me of things form that specific corner or track. i guess racers know what im on about too.
i think it has some sentimental value for people to have what is "known" .
would be great if one day could revive "classic" tracks and still have the new things too.

but im also okay with changes. and rather better good quality changes we also need to wait a little time for getting. but in the end i think itll be worth it. even tho... one could miss it at times...

New Version 0.6T - More robust multiplayer system
(225 posts, started )
FGED GREDG RDFGDR GSFDG